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

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -