<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -295,4 +295,36 @@ $('div.columns').equalHeight();
 		});
 		$(this).css('height',max_height+'px');
 	}
+})(jQuery);
+
+/*
+Placeholder text for your inputs, ie. search boxes
+
+Only adds placeholder text to input if field is empty. Clears the input on focus.
+Adds and removes CSS class &quot;placeholder&quot; to/from the input so you can style the placeholder state.
+
+CSS:
+input#search_field {color:#666}
+
+Javascript:
+$('input#search_field').placeholder('Use this box to search');
+------------------------------------------------------*/
+;(function($){
+  $.fn.placeholder = function(placeholderValue){
+    
+    $(this).focus(function() {
+      if($(this).val() == placeholderValue) {
+        $(this).removeClass('placeholder');
+        $(this).val('');
+      }
+    });
+
+    $(this).blur(function(){
+      if($(this).val() === '') {
+        $(this).addClass('placeholder');
+        $(this).val(placeholderValue);
+      }
+    });
+    $(this).trigger('blur');
+  }
 })(jQuery);
\ No newline at end of file</diff>
      <filename>common.jquery.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4a30f688c6a437b2ff17ae690afa3e2c70e3f8b8</id>
    </parent>
  </parents>
  <author>
    <name>Ismael Celis</name>
    <email>ismaelct@gmail.com</email>
  </author>
  <url>http://github.com/ismasan/jquery-patterns/commit/d89631a05b3588872aca661b17a5b2c230d2386c</url>
  <id>d89631a05b3588872aca661b17a5b2c230d2386c</id>
  <committed-date>2009-11-05T05:11:24-08:00</committed-date>
  <authored-date>2009-11-05T05:11:24-08:00</authored-date>
  <message>Added $.fn.placeholder()</message>
  <tree>5853a4c8fc923cca81a0f6e032bcea294001d4c0</tree>
  <committer>
    <name>Ismael Celis</name>
    <email>ismaelct@gmail.com</email>
  </committer>
</commit>
