你想不写那个?是这个:
$("img.lazy").lazyload({
/*placeholder: "themes/handuyishe/index/images/1.png",*/
effect:"fadeIn",
data_attribute:'src'
});
$("img.lazy").lazyload({
/*placeholder: "themes/handuyishe/index/images/1.png",*/
effect:"fadeIn",
data_attribute:'src'
});
我不想写 这一段
用下面的直接就有这个效果的那种
只要 img包含 data-lazy 就直接有效果,
<img class="lazy" iguid="24" data-lazy data-src="tup.jpg">
这种东西直接去看jq的API就好了
if($("img.lazy").length>0){
$("img.lazy").lazyload({
/*placeholder: "themes/handuyishe/index/images/1.png",*/
effect:"fadeIn",
data_attribute:'src'
});
}
});
//可以把这个放入公共调用的js里面,以后要想调用这个效果就加个样式 lazy不知道你是不是这个意思!