jquery - If input box is empty show label, if there is text, hide label -


is there way can show <label> if contact form input box empty , hide once starts entering text?

this sample of markup

<label for="name">name *</label> <input type="text" id="name" name="name" value=""/> 

try this:

$("#name").bind("keyup", function(e) {     $('label[for="name"]').hide(); }) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -