欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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)論