1(function($){ 2 3var gf_placeholder = function() { 4 5 $('.gform_wrapper .gplaceholder') 6 .find('input, textarea').filter(function(i){ 7 var $field = $(this); 8 9 if (this.nodeName == 'INPUT') { 10 var type = this.type; 11 return !(type == 'hidden' || type == 'file' || type == 'radio' || type == 'checkbox'); 12 } 13 14 return true; 15 }) 16 .each(function(){ 17 var $field = $(this); 18 19 var id = this.id; 20 var $labels = $('label[for=' + id + ']').hide(); 21 var label = $labels.last().text(); 22 23 if (label.length > 0 && label[ label.length-1 ] == '*') { 24 label = label.substring(0, label.length-1) + ' *'; 25 } 26 27 $field[0].setAttribute('placeholder', label); 28 }); 29 30 var support = (!('placeholder' in document.createElement('input'))); // borrowed from Modernizr.com 31 if ( support && jquery_placeholder_url ) 32 $.ajax({ 33 cache: true, 34 dataType: 'script', 35 url: jquery_placeholder_url, 36 success: function() { 37 $('input[placeholder], textarea[placeholder]').placeholder({ 38 blankSubmit: true 39 }); 40 }, 41 type: 'get' 42 }); 43}; 44 45$(document).ready(function(){ 46 gf_placeholder(); 47 $(document).bind('gform_post_render', gf_placeholder); 48}); 49 50})(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.