Clear input default value on click


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $(document).ready(function() {
  2. $('#inputWrapper').click(function() {
  3. if($(':input','#formId').val() == 'Search...')
  4. {
  5. $(':input','#formId').val('');
  6. }
  7. });
  8. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.