
Hai korang , hari ni aku nak buat tuto pasal jquery lazy load . Ini khas untuk blog yang berat and ada gambar banyak . Kira kalau guna tuto ni blog korang jadi ringan macam tu . Kalau nak ikut step kat bawah .


<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: "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmhnt-wOCRlZL9hnyGcbJ2_OiKSjYFP_ue9vKU-KrL3gvv6_T5c4ubVD2tKqK2qn8tK_enUoWBrd7nzfDhk-TvNwqsHGuWS_eMDo6bLqcp_d86Tev7Q41YOxc8CIcqA8zE6d48KVg04Qo/s1600/grey.gif"
});
});
</script>

No comments:
Post a Comment