码迷,mamicode.com
首页 > 其他好文 > 详细

Need a code of lazy load for div--reference

时间:2014-08-19 12:18:34      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:style   http   color   io   for   ar   art   cti   

1. For all DIVs of a page

$(function() {  $("div").lazyload({effect: ‘fadeIn‘});});

 

2. For a particular DIV having some ID like:

<div id="lazyload"> some content </div>

 

$(function() {  $("div#lazyload").lazyload({effect: ‘fadeIn‘});});

 

OR

 

$(function() {  $("#lazyload").lazyload({effect: ‘fadeIn‘});});

 

 

3. For a particular DIVs having some Class like:

<div class="lazyload"> some content </div>

 

$(function() {  $("div.lazyload").lazyload({effect: ‘fadeIn‘});});

 

OR

 

$(function() {  $(".lazyload").lazyload({effect: ‘fadeIn‘});});

 

4. These actions can also be performed on some trigger like Button Click, OnBlur etc

 

$(function() {

 

$("#button").click(function(){

   $(".lazyload").lazyload({effect: ‘fadeIn‘});

});  });

 

reference:http://www.bayt.com/en/specialties/q/33668/need-a-code-of-lazy-load-for-div/

Need a code of lazy load for div--reference,布布扣,bubuko.com

Need a code of lazy load for div--reference

标签:style   http   color   io   for   ar   art   cti   

原文地址:http://www.cnblogs.com/davidwang456/p/3921542.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!