I’m looking to make a simple jquery plugin. It would typically be called on textboxes/textareas, its job would be to clear the textbox of all text when focus is put there, and fill it back with what it had previously when focus is taken away.
E.g I have a textbox for the user’s name. By default it says : ‘First Name’. I want to have that cleared away if i click/focus in that textbox, but when I focus away, I want it to say ‘first name’ again.
What should I call this plugin? I’d probably use it like this:
$("#myTextbox").pluginName();
You are hiding some text, so call it something like hideXText().
hidetoggleExampleText()hide`toggleTip()hide`toggleHintText()hide`toggleHint