Created
November 8, 2012 17:58
-
-
Save emtoledo/4040410 to your computer and use it in GitHub Desktop.
Inline Survey JS
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
| // Show Thanks Message | |
| function custommsg() { | |
| $('#form-message').show(); | |
| $('#ss-form').hide(); | |
| } | |
| // Label touch for devices | |
| $('label[for]').click(function () { | |
| var el = $(this).attr('for'); | |
| if ($('#' + el + '[type=radio], #' + el + '[type=checkbox]').attr('selected', !$('#' + el).attr('selected'))) { | |
| } | |
| else { | |
| $('#' + el)[0].focus(); | |
| } | |
| }); | |
| //Submit on radio select | |
| $('input[name="entry.0.group"]').change(function () { | |
| $('#ss-form-submit').trigger('click'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment