Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does do the $(@) in CoffeesScript?

Simple question, What does do the following line:

$(@)

in CoffeeScript ?

like image 961
Leszek Andrukanis Avatar asked Dec 09 '25 09:12

Leszek Andrukanis


1 Answers

@ is an alias for this.

So it calls the $ function (which may, or not, be jQuery depending on the rest of your code) with this as argument.

like image 116
Denys Séguret Avatar answered Dec 11 '25 23:12

Denys Séguret



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!