Gravityforms placeholders
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(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment