1(function($){ 2 "use strict"; 3 var defaults = { 4 hintClass: "hint" 5 }; 6 7 var methods = 8 { 9 init : function(options){ 10 return this.each(function(){ 11 options = $.extend(defaults, options); 12 if($(this).attr("placeholder")==$(this).val()) 13 $(this).addClass(options.hintClass); 14 $(this).focus(function(){ 15 if($(this).attr("placeholder")==$(this).val()) 16 $(this).val("").removeClass(options.hintClass); 17 }); 18 $(this).blur(function(){ 19 if($(this).val()=="") 20 $(this).val($(this).attr("placeholder")).addClass(options.hintClass); 21 }); 22 }); 23 } 24 }; 25 26 jQuery.fn.hint = function(method){ 27 if(methods[method]) 28 return methods[method].apply(this, arguments); 29 else if(typeof(method)==='object' || !method) 30 return methods.init.apply(this, arguments); 31 }; 32})(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.