Skip to content

Instantly share code, notes, and snippets.

@stoplion
Created January 5, 2012 14:10
Show Gist options
  • Save stoplion/1565406 to your computer and use it in GitHub Desktop.
Save stoplion/1565406 to your computer and use it in GitHub Desktop.
Hide message when any checkbox is checked
$(document).ready ->
$("input[type='checkbox']").change ->
toggle_message()
toggle_message()
toggle_message = ->
if $("input[type='checkbox']").is(":checked")
$("#message").fadeIn()
else
$("#message").fadeOut()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment