luis-almeida / unveil

A very lightweight jQuery plugin to lazy load images
4.16k stars 676 forks source link

I cannot understand the meaning of ‘scroll.unveil resize.unveil lookup.unveil’ in source code #116

Open lynnic26 opened 8 years ago

lynnic26 commented 8 years ago

what's scroll.unveil resize.unveil lookup.unveil for, can somebody make some comments on this? $w.on("scroll.unveil resize.unveil lookup.unveil", unveil);

IDisposable commented 8 years ago

Those are just the standard jQuery events but are (properly!) namespaced to prevent accidentally changing the bindings of some OTHER caller. See https://css-tricks.com/namespaced-events-jquery/ and http://www.andismith.com/blog/2013/02/jquery-on-and-off-namespacing/