I currently have a login form that clears text from the field after a user clicks on it. How can I have the field’s value be replaced with the original text if the field looses focus and is empty? Something like
$("#input_field").loseFocus(//Total pseudocode.
if((this).attr("value")==''){
(this).attr("value","Original text! Woohoo!");
}
);
I do use jQuery, and I can provide the webpage if it’s necessary.
Working demo: http://jsfiddle.net/AlienWebguy/gVPHM/1/