This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.setPlaceholder = function(){ | |
return this.each(function(){ | |
var label = $(this).parent().prev(); | |
label.hide(); | |
var label = $(this).parent().prev().text().replace('*',''); | |
$(this).attr('placeholder',label); | |
}); | |
}; | |
})(jQuery); | |
jQuery(document).ready(function($){ | |
$('.banner-form input[type=text],.banner-form textarea').setPlaceholder(); | |
$(document).bind('gform_post_render', function(){ | |
$('.banner-form input[type=text],.banner-form textarea').setPlaceholder(); | |
}); | |
}); |
Questions, comments, or suggestion for improvement? Leave a comment on the GitHub Gist page.