coffeescript - Coffescript show alert when clicking on element? -
i have code
$ -> $('h1').click -> alert "i knew it!" init()
what's wrong it?nothing happens.
not sure probablt code formatted inproperly (what important in coffeescript). callback click
event must nested (otherwise passed callback empty function)
$ -> $('h1').click -> alert("i knew it!") init()
Comments
Post a Comment