Phantom writing reminiscent of the ghostly prose found on a Tumblr registration

Is there a way to create a URL field similar to the one on ? It's the field where the text is faded and when you click on it to type, it automatically appends ".tumblr.com" that cannot be erased or highlighted. The JavaScript used for this feature is obfuscated so I'm not sure how it was done. I would prefer to use jQuery, but as long as it works, I'm open to other options.

Thank you in advance!

Answer №1

Upon further review: Upon revisiting the content, I noticed that it takes the input as you type and inserts it into the ghostwriter span located above the input field. It's actually quite simple. The text ".tumblr.com" is part of the span itself. The structure resembles:

<span id="ghostwriter"><span id="ghostwriter-copy">Your Input</span>.tumblr.com</span>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the process for customizing the heading titles on various pages within the Next.js application directory?

Within the app directory of Next.js 13, I have a default root layout setup: import "./globals.css"; export default function RootLayout({ children }) { return ( <html lang="en"> <head> <title>Create ...

Organizing a drop down list in alphabetical order with Angular.js is not supported

I have encountered an issue with ordering the drop down list alphabetically using Angular.js. Below is the code I am using: <div class="input-group bmargindiv1 col-md-12"> <span class="input-group-addon ndrftextwidth text-right" style="width:180p ...

Exploring the world of jQuery AJAX alongside Google's currency calculator

I'm currently working on a code that utilizes an AJAX call to access the Google currency calculator. The expected outcome is to receive a JSON array that can then be used to gather exchange rate data. Here is the link: http://www.google.com/ig/cal ...

What could be causing my script to not execute properly?

I have reviewed my script multiple times and I am completely stumped as to why it is not running at all. Any assistance would be greatly appreciated... This is the script in question.... </head> <script type="text/javascript> $(document) ...

Exchange data using socket.io in nodejs and express with a different javascript file

Imagine having a JavaScript file that needs to interact with another JavaScript file in order to share data between them. For instance, let's consider a file named game_server.js. Within this file, there are two variables that we want to access in th ...

Unable to locate webpack bundle in Express

I'm currently working with Node, Express.js, Webpack, and Handlebars for my app development. Despite searching extensively for a solution, I have not been able to find one that resolves my issue. Below is the structure of my files: Handlebars (main f ...

Obtain the total by adding values from additional radio buttons selected

Need assistance with summing values from multiple radio inputs dynamically. Want to calculate the total price ('$res' variable) after checking them. Despite trying to change 'settype' to int, it didn't work out as expected. Any hel ...

"By selecting the image, you can initiate the submission of the form

I am trying to figure out why clicking on the image in my form is triggering the form submission by default. Can someone please provide guidance on this issue? <form name="test1" action="er" method="post" onsubmit="return validateForm()" <input ty ...

Rotating elements with timed jQuery

I'm having trouble getting the selector to rotate at different intervals. I attempted using an if/else statement to make the first rotation occur after 3 seconds and subsequent rotations occur after 30 seconds. Unfortunately, it's rotating every ...

Preserve the chosen JQuery UI tab even after submitting the form

I am currently utilizing JQuery UI tabs that contain multiple forms within the tabs. My goal is to ensure that the Tab Selection remains unchanged even after a Form Post occurs. I prefer not to use cookie.js You can view my code here on jsbin Is there a ...

Taking pictures on my website with the help of c#, HTML (excluding HTML 5), and javascript

My current project requires me to capture an image from a webcam, and I have been brainstorming solutions. However, there are specific conditions that I must adhere to in order to achieve the desired result: I am unable to utilize HTML5 due to compatibil ...

Is there a way to postpone these animations without relying on setTimeout?

As I develop a single-page website, my goal is to smoothly transition between sections by first animating out the current content and then animating in the new content. Currently, I have achieved this using setTimeout(), where I animate out the current con ...

Error in ThreeJS: Unexpected data type for Orbit Controls - b[c].call is not a valid function

I have been working on a three.js project and have successfully implemented orbit controls. However, I am encountering an error where for every single pixel I move my mouse over, the following error is thrown: Uncaught TypeError: b[c].call is not a functi ...

Obtain the ending section of a URL using JavaScript

Is it possible to extract the username from a URL like this example? I'm interested in seeing a regex method for achieving this. The existing code snippet only retrieves the domain name: var url = $(location).attr('href'); alert(get_doma ...

Guide for implementing smooth fade in and out effect for toggling text with button click

I have this code snippet that toggles text on button click: <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> function toggleText(){ ...

next-images encountered an error during parsing: Unexpected character ''

Having trouble loading images dynamically with next-images: //Working <Image src={require(`../../images/exampleImage.jpg` )}/> However, I want to use a dynamic URL like this: //Not working <img src={require(`../../images/${image}.jpg` )}/> Th ...

What are the steps for printing a webpage in landscape orientation using Firefox and IE11?

@page { size: 11in 8.5in; } This code snippet did not achieve the desired result in Internet Explorer or Firefox. The transform: rotate(270deg); property only worked for the first page. ...

The CSS display:block property isn't functioning as intended

I'm currently working on a contact form using CSS and HTML, but I'm having trouble getting the boxes to display properly in a 'block' form (display:block). HTML: <section class="body"> <form method="post" action="index.php ...

Is it possible to bind a function to data in Vue js?

Can a function be data bound in Vue? In my template, I am trying something like this: <title> {{nameofFunction()}}</title> However, when I run it, it simply displays 'native function' on the page. Any insights would be appreciated ...

Adjust the height of a DIV element dynamically to match the height of the viewport

How can I make a div's height 30% of the viewport and ensure it scales when the viewport size changes? I attempted setting min-height: 30%; height: 30% but without success. I considered using JQuery's height(); function, but I'm unsure how ...