Sorry for duplicate.

On 24 February 2012 11:26, wrote:
In my html code I have:

<a onclick="invite(); return false;" href="#">Invite</a>

If in a file.js I put:

function invite() {
alert("ok");
}

and I click on the link then the invite function work and I see "ok".
If in a file.js.coffee I put

invite = ->
alert "ok"

it says invite is not defined.
There is something wrong in defining the invite function?

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 7 | next ›
Discussion Overview
groupcoffeescript @
categoriescoffeescript, rubyonrails
postedFeb 24, '12 at 3:13p
activeFeb 25, '12 at 9:07p
posts7
users4
websitecoffeescript.org

People

Translate

site design / logo © 2021 Grokbase