Created
July 20, 2015 04:32
-
-
Save BeardedGinger/a963c2c29e21ce01ca53 to your computer and use it in GitHub Desktop.
Add gravity form field type to container ".ginput_container" div.
This file contains hidden or 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.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