48
rated 0 times
[
55]
[
7]
/ answers: 1 / hits: 17502
/ 13 Years ago, fri, june 24, 2011, 12:00:00
I want to pass two anonymous functions as arguments for jQuery's hover, like so:
$('element').hover(
function() {
// do stuff on mouseover
},
function() {
// do stuff on mouseout
}
);
It's easy with just one – hover ->
– but what is the proper syntax in CoffeeScript for two? I tried ...hover ->
, ...hover( ->...
, etc. but nothing gets me the above structure.
More From » jquery