Skip to content

Instantly share code, notes, and snippets.

@zythum
Last active January 3, 2016 14:39
Show Gist options
  • Save zythum/8477617 to your computer and use it in GitHub Desktop.
Save zythum/8477617 to your computer and use it in GitHub Desktop.
#用一个checkbox来做开关
flag = true;
$('input[type=checkbox]').on 'click', ()->
flag = $(this).prop 'checked'
#return
#这个return 必须加,不如就呵呵了
#这个不算是问题,是需要注意的点
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment