Skip to content

Instantly share code, notes, and snippets.

@marknt15
Created June 1, 2015 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marknt15/78d9c4f07b6658964493 to your computer and use it in GitHub Desktop.
Save marknt15/78d9c4f07b6658964493 to your computer and use it in GitHub Desktop.
jQuery toggle checkbox on and off
// check if checkbox is checked
if ($("#toggle_start").is(':checked')) {
var datetimepicker_start = $("#datetimepicker_start").val();
} else {
var datetimepicker_start = 'disabled';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment