understanding on() in Jquery

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
gautamz07
Forum Contributor
Posts: 331
Joined: Wed May 14, 2014 12:18 pm

understanding on() in Jquery

Post 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 .
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: understanding on() in Jquery

Post 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.
User avatar
gautamz07
Forum Contributor
Posts: 331
Joined: Wed May 14, 2014 12:18 pm

Re: understanding on() in Jquery

Post by gautamz07 »

Thanks celauren .
Post Reply