jquery - lazy loading of images on my webpage -
after research , after i've asked questions, i've realized following: jquery plugin lazy load (http://www.appelsiini.net/projects/lazyload) doesn't work on safari , not on firefox.
i've tested demo.
please need use firebug, , see how images loaded @ once @ beginning , loaded again on scroll (so have double downloading).
could give me solution how implement mashable.com images lazy layout ?
thanks
do this:
<img alt='some_text' _src="img_url" class='lazyload'> // please note have added underscore character before 'src' jquery(function(){ jquery('.lazyload').each(function(){ var _elm= jquery(this); _elm.attr('src',_elm.attr('_src')); //on dom ready loop through each //image class=lazyload , add src attribute it. }) });
Comments
Post a Comment