Great idea, Mika! Thanks for sharing this.


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Feb 4, 2008, at 8:13 AM, Mika Tuupola wrote:


http://www.appelsiini.net/projects/viewport

I recently needed to locate images inside and outside of viewport. So I extracted selectors I had in Lazy Load and added some new ones. Result is viewport selectors plugin. Gives you new jQuery selectors such as:

$(":in-viewport")
$(":below-the-fold")
$(":above-the-top")
$(":left-of-screen")
$(":right-of-screen")

They are not the fastest ones so if you have gazillion of images / elements to check it will weel sluggish. I tested with main browsers but any feedback, especially bug reports are welcome. Demo here:

http://www.appelsiini.net/projects/viewport/3x2.html

--
Mika Tuupola
http://www.appelsiini.net/


Reply via email to