<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Page comments</title>
		<link>http://www.ssbits.com/home/</link>
		<atom:link href="http://www.ssbits.com/home/" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2009/clearing-the-search-field-on-click-with-jquery/#PageComment_845</link>
			<description>the code I got to work in IE9 was (if you want to try and modify your code above):

var searchBox = $(&quot;#SearchForm_SearchForm_Search&quot;);
		var searchBoxDefault = &quot;Search&quot;;  
		searchBox.focus(function(){  
			if($(this).attr(&quot;value&quot;) == searchBoxDefault) $(this).attr(&quot;value&quot;, &quot;&quot;);  
		});  
		searchBox.blur(function(){  
			if($(this).attr(&quot;value&quot;) == &quot;&quot;) $(this).attr(&quot;value&quot;, searchBoxDefault);  
		});  </description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2009/clearing-the-search-field-on-click-with-jquery/#PageComment_845</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2009/clearing-the-search-field-on-click-with-jquery/#PageComment_844</link>
			<description>I use this all the time...but, it has stopped working in IE 9.  Have you seen this, and if so, do you know of a fix?</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2009/clearing-the-search-field-on-click-with-jquery/#PageComment_844</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2009/clearing-the-search-field-on-click-with-jquery/#PageComment_286</link>
			<description>Nice snippet - I have taken the idea a little further and created a small jQuery plugin:

(function($) {
$.fn.overLabel = function() {
        return this.focus(function() {
            if (this.value == this.defaultValue) {
                this.value = '';
            }
        }).blur(function() {
            if (!this.value.length) {
                this.value = this.defaultValue;
            }
        });
    };
})(jQuery);

To use this:

$(&lt;selector here&gt;).overLabel();

This means I can target a single DOM element easily...

Cheers!</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2009/clearing-the-search-field-on-click-with-jquery/#PageComment_286</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2009/clearing-the-search-field-on-click-with-jquery/#PageComment_263</link>
			<description>Enjoyed your Snippet!

Some nice tweeks might be to (be able to) set the text and style of the &quot;hint&quot; for any input or textarea fields. For example, I use the following jQuery plugin...

* Requirements::customScript:
    jQuery(document).ready(function() {
      jQuery(&quot;#SearchForm_SearchForm_Search&quot;).inputHint(&quot;Search&quot;);
    });

* jquery.utils.js:
    (function(jQuery) {
      var hintClass = &quot;jqueryhint&quot;;
      jQuery.fn.inputHint = function(hint) {
        return(this.each(function() {
          var field = $(this).addClass(hintClass).val(hint);
          field.focus(function() {
            if(field.val() == hint)
              field.removeClass(hintClass).val(&quot;&quot;);
          }).blur(function() {
            if(field.val() == &quot;&quot;)
              field.addClass(hintClass).val(hint);
          });
        }));
      }
    })(jQuery);

* in form.css:
    input.jqueryhint { color: #999; }

BTW - I use &quot;focus&quot; (rather than &quot;click&quot;) in case people &quot;tab&quot; into the field area... :-)</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2009/clearing-the-search-field-on-click-with-jquery/#PageComment_263</guid>
		</item>
		

	</channel>
</rss>