Skip to content

Instantly share code, notes, and snippets.

@seandogg
Created October 2, 2017 19:33
Show Gist options
  • Save seandogg/5f84eeb00bd57a999f8a86e91f2d5286 to your computer and use it in GitHub Desktop.
Save seandogg/5f84eeb00bd57a999f8a86e91f2d5286 to your computer and use it in GitHub Desktop.
// hide the hidden-input
$('.hidden-input').hide();
// attach an ID to the checkbox so it's toggleable
$('#infiniteoptions-container > div.conditional > span > fieldset > label > input').attr('id', 'hidden');
// if the checkbox is checked, toggle the hidden input to show it
$('#hidden').click(function() {
$(".hidden-input").toggle(this.checked);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment