1(function($){ 2 var defaults = { 3 hintClass: "hint" 4 }; 5 6 var methods = 7 { 8 init : function(options){ 9 return this.each(function(){ 10 options = $.extend(defaults, options); 11 if($(this).attr("placeholder")==$(this).val()) 12 $(this).addClass(options.hintClass); 13 $(this).focus(function(){ 14 if($(this).attr("placeholder")==$(this).val()) 15 $(this).val("").removeClass(options.hintClass); 16 }); 17 $(this).blur(function(){ 18 if($(this).val()=="") 19 $(this).val($(this).attr("placeholder")).addClass(options.hintClass); 20 }); 21 }); 22 } 23 }; 24 25 jQuery.fn.hint = function(method){ 26 if(methods[method]) 27 return methods[method].apply(this, arguments); 28 else if(typeof(method)==='object' || !method) 29 return methods.init.apply(this, arguments); 30 }; 31})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.