Home Tutorial Freebies Jatt & Kucing Others Blogwalking

28 October, 2010

Ringankan blog guna Jquery lazy load.

Jquery lazy load ni adalah code yang meringankan blog kita.kalau blog korang memang berkapah gambar-gambar yang korang langsung taknak buang.Widget ni memang TERBAIK untuk korang.Tak la lari pengunjung yang datang kat blog korang sebabnya lambat nak tunggu loading blog.


FIRST METHOD


1. Pergi Dashboard > Design > Add a Gadget > HTML/Javascript
2. Pastu copy paste code kat bawah ni dalam kotak Gadget tadi ;
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js' type='text/javascript'></script><script type='text/javascript' src='https://sites.google.com/site/jquery01/jquery.lazyload.mini.js?ver=1.5.0'></script><script type="text/javascript">jQuery(document).ready(function($){if (navigator.platform == "iPad") return;jQuery("img").lazyload({effect:"fadeIn",placeholder: "http://3.bp.blogspot.com/_LZtXSNcp76A/THkEtEOZfrI/AAAAAAAABRo/IARVMD_8TwA/s1600/grey.gif"});});</script>
3. Then save je la


SECOND METHOD


1. Pergi Dashboard > Design > Edit HTML
2. Tick Expand Widget Templates
3. Ctrl+f search </body> ataupun </head> ;
4. Paste code bawah dekat atas code </body> ataupun </head> tadi ;
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js' type='text/javascript'></script><script type='text/javascript' src='https://sites.google.com/site/jquery01/jquery.lazyload.mini.js?ver=1.5.0'></script><script type="text/javascript">jQuery(document).ready(function($){if (navigator.platform == "iPad") return;jQuery("img").lazyload({effect:"fadeIn",placeholder: "http://3.bp.blogspot.com/_LZtXSNcp76A/THkEtEOZfrI/AAAAAAAABRo/IARVMD_8TwA/s1600/grey.gif"});});</script>
5. Preview.Kalau takde error tekan save.

No comments:

LinkWithin