Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save BeardedGinger/a963c2c29e21ce01ca53 to your computer and use it in GitHub Desktop.

Select an option

Save BeardedGinger/a963c2c29e21ce01ca53 to your computer and use it in GitHub Desktop.
Add gravity form field type to container ".ginput_container" div.
(function($) {
$.fn.gravityFieldTypes = function() {
var $this = $(this);
$this.each(function() {
var $input = $(this).find('>:first-child');
var $type = $input.prop('type');
$(this).addClass($type);
});
}
})(jQuery);
jQuery(document).ready(function($){
$('.ginput_container').gravityFieldTypes();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment