- 相關(guān)推薦
關(guān)于jquery簡(jiǎn)單圖片切換顯示效果實(shí)現(xiàn)方法介紹
本文實(shí)例講述了jquery簡(jiǎn)單圖片切換顯示效果實(shí)現(xiàn)方法,分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:
復(fù)制代碼 代碼如下:
$(function(){
$("#item li:not(:first)").css("display","none");//只顯示第一張圖片,其它隱藏
var bb = $("#item li:last");
var aa = $("#item li:first");
setInterval(function(){
if(bb.is(":visible")){
aa.fadeIn(1000).addClass("in");
bb.hide();
}else{
$("#item li:visible").addClass("in");
$("#item li.in").next().fadeIn(1000);
$("#item li.in").fadeOut(1000).removeClass("in");
}
},3000);
});
li{list-style:none;display:block;width:500px;border:1px solid #ccc;padding:5px;}
.in{display:block;}
【jquery簡(jiǎn)單圖片切換顯示效果實(shí)現(xiàn)方法介紹】相關(guān)文章:
關(guān)于jQuery實(shí)現(xiàn)高亮顯示的方法介紹03-29
有關(guān)javascript實(shí)現(xiàn)的多個(gè)層切換效果通用函數(shù)示例03-31
jquery之超簡(jiǎn)單的div顯示和隱藏特效demo簡(jiǎn)介03-29
關(guān)jQuery彈出窗口簡(jiǎn)單實(shí)現(xiàn)代碼-javascript編程03-30
jQuery(js)如何獲取文字寬度(顯示長(zhǎng)度)03-29
jQuery中prev()方法用法03-30
asp.net+jquery Jsonp使用方法介紹03-29
護(hù)眼顯示器效果01-31