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.

Revisions

  1. zythum revised this gist Jan 17, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 又一个需要注意的地方.coffee
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #用一个checkbox来做开关
    flag = true;
    $('[input=checkbox]').on 'click', ()->
    $('input[type=checkbox]').on 'click', ()->
    flag = $(this).prop 'checked'
    #return

  2. zythum revised this gist Jan 17, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 又一个需要注意的地方.coffee
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #用一个checkbox来做开关
    flag = true;
    $('[input=checkbox]').on 'checked', ()->
    $('[input=checkbox]').on 'click', ()->
    flag = $(this).prop 'checked'
    #return

  3. zythum created this gist Jan 17, 2014.
    9 changes: 9 additions & 0 deletions 又一个需要注意的地方.coffee
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #用一个checkbox来做开关
    flag = true;
    $('[input=checkbox]').on 'checked', ()->
    flag = $(this).prop 'checked'
    #return


    #这个return 必须加,不如就呵呵了
    #这个不算是问题,是需要注意的点