最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

JQuery實(shí)現(xiàn)的圖文自動(dòng)輪播效果插件

 更新時(shí)間:2015年06月19日 15:20:07   作者:任意球  
這篇文章主要介紹了JQuery實(shí)現(xiàn)的圖文自動(dòng)輪播效果插件,涉及jQuery處理鼠標(biāo)事件及動(dòng)畫效果的方法,需要的朋友可以參考下

本文實(shí)例講述了JQuery實(shí)現(xiàn)的圖文自動(dòng)輪播效果插件。分享給大家供大家參考。具體如下:

intervalID = setInterval(cycleImage, slidetime);
$(".main_image .desc").show(); // 展示圖片
$(".main_image .block").animate({ opacity: 0.85 }, 1 ); // 設(shè)置透明度
//點(diǎn)擊和懸停事件
$(".image_thumb ul li:first").addClass('active'); 
$(".image_thumb ul li").click(function(){ 
// 設(shè)置參數(shù)
var imgAlt = $(this).find('img').attr("alt"); 
var imgTitle = $(this).find('a').attr("href"); 
var imgDesc = $(this).find('.block').html(); // 從類block中獲取html
var imgDescHeight = $(".main_image").find('.block').height();
// 計(jì)算類block的高度
if ($(this).is(".active")) { // 如果已經(jīng)激活了,之后的操作...
return false; 
} else {
// 動(dòng)畫操作
$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 250 , function() {
$(".main_image .block").html(imgDesc).animate({ opacity: 0.85,marginBottom: "0" }, 250 );
$(".main_image img").attr({ src: imgTitle , alt: imgAlt});
});
}
$(".image_thumb ul li").removeClass('active'); 
$(this).addClass('active'); 
return false;
}) .hover(function(){
$(this).addClass('hover');
}, function() {
$(this).removeClass('hover');
});
// Toggle Teaser
$("a.collapse").click(function(){
$(".main_image .block").slideToggle();
$("a.collapse").toggleClass("show");
});

希望本文所述對(duì)大家的jQuery程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論

紫阳县| 奎屯市| 黑水县| 和政县| 滨州市| 准格尔旗| 九江县| 汽车| 牟定县| 越西县| 木兰县| 大渡口区| 沈阳市| 廉江市| 延川县| 武汉市| 芒康县| 哈密市| 进贤县| 城市| 台前县| 河源市| 扶风县| 平山县| 太仆寺旗| 哈尔滨市| 城步| 牡丹江市| 锦州市| 邯郸县| 布尔津县| 海盐县| 晋中市| 松溪县| 花垣县| 海丰县| 修武县| 宣城市| 元江| 宕昌县| 长宁县|