Skip to content

Instantly share code, notes, and snippets.

@emtoledo
Created November 8, 2012 17:58
Show Gist options
  • Select an option

  • Save emtoledo/4040410 to your computer and use it in GitHub Desktop.

Select an option

Save emtoledo/4040410 to your computer and use it in GitHub Desktop.
Inline Survey JS
// 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