Page 1 of 1

understanding on() in Jquery

Posted: Tue Nov 18, 2014 3:36 am
by gautamz07
well actually i do understand what the on() function does in Jquery but i don't quite get what's it doing in this case ??

can somebody explain what the following line is really doing ?

Code: Select all

$w.on("scroll.unveil resize.unveil lookup.unveil", unveil);
the entire code can be found on github .

https://github.com/luis-almeida/unveil/ ... .unveil.js .

Re: understanding on() in Jquery

Posted: Tue Nov 18, 2014 6:47 am
by Celauran
http://api.jquery.com/on/
events
Type: String
One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
There are three events listed that will trigger the action, and unveil is the action triggered when any of those events fire.

Re: understanding on() in Jquery

Posted: Tue Nov 18, 2014 8:15 am
by gautamz07
Thanks celauren .