title: Set default value for Search field - Please Help!
body: <p>I'm trying to set a default value for a search field. The idea is that the Search-Field has the value "Search" until the user clicks into it, then it should be empty. Also as long as it is "blank" (with "Search" as the value) it should have the class ".blank". </p>
  
  <p>I tried this</p>
  
  <pre><code>&lt;input autocomplete="off" class="" id="searchq" name="searchq" onblur="if (this.value == '') { this.value='Search'; jQuery(this).addClass('blank'); };" onfocus="if (this.value == 'Search') { this.value=''; jQuery(this).removeClass('blank'); };" type="text" value="" /&gt;
  </code></pre>
  
  <p>it works so far, but when I load the site, the field is just empty. I have to click inside the field first and then somewhere on the page to make the effect working.</p>
  
  <p>I guess it has something to do with onBlur. Any ideas?</p>
  
  <p>Thanks!</p>