by
Neon Quach
30. July 2010 17:14
If you are using blogengine, you want to embed lazy load image libray in your blog, which is cool library is makes your image only load when you see it, not all by default
We have 2 way to embed this libary in your blog
1. By programming lazy loading images với jQuery
2. By adding script to header (in admin section)
The first, download libraies and upload to your host: Jquery Lazy Load and Jquery
http://www.appelsiini.net/projects/lazyload
http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js
I uploaded it to my host:
http://code2code.info/tmp/js/jquery-1.4.2.min_2.js
http://code2code.info/tmp/js/jquery.lazyload.min.js
http://code2code.info/tmp/images/grey.gif
I added the grey.gif becuase i want the user see the grey before loading the image, if everything is done, now you login to blogengine by admin account.
Navigate to HTML head section in Settings page
< script src="http://code2code.info/tmp/js/jquery-1.4.2.min_2.js" type="text/javascript"></script>
<script src="http://code2code.info/tmp/js/jquery.lazyload.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(function () {
$("img").lazyload({ placeholder: "http://code2code.info/tmp/images/grey.gif", effect: "fadeIn" });
});
</script>

Hope this help