luis-almeida / unveil

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

Load only visible images #67

Open ErtugKaya opened 10 years ago

ErtugKaya commented 10 years ago

$("img").trigger( "unveil" ); checks if image is in view before loading.

ErtugKaya commented 10 years ago

Fixes #7 . Please check code, I am a newbie in javascript.

joeldbirch commented 10 years ago

I haven't tested it, but a quick scan of the code suggests this might be the sort of thing the bug fix would consist of. I like that you extracted the isInView logic into a reusable function. Hope this helps @luis-almeida, thanks for your efforts @ErtugKaya, I'm really looking forward to a fix for this.