首先非常感谢网友三石的无私分享,这是他分享到JquerySchool网站上的第一款作品,非常实用,是他从网站扣下来的,第一时间与大家分享,实现了jquery图文开关灯切换特效,使用非常简单,网友们下载下来看一下就明白了。。。
初始化jquery代码如下:
$(function(){
$('.one_fourth_box').each(function(){
$(this).hover(function(){
$(this).children('.ofb-img').stop(true).animate({top:'-135px'})
$(this).children('.ofb-img-bottom').stop(true).animate({top:'25px'})
$(this).children('.ofb-text').stop(true).animate({top:'160px'})
$(this).children('.ofb-text-top').stop(true).animate({top:'25px'})
$(this).children('.ofb-bg').stop(true,true).fadeIn();
},function(){
$(this).children('.ofb-img').stop(true).animate({top:'25px'})
$(this).children('.ofb-img-bottom').stop(true).animate({top:'160px'})
$(this).children('.ofb-text').stop(true).animate({top:'25px'})
$(this).children('.ofb-text-top').stop(true).animate({top:'-110px'})
$(this).children('.ofb-bg').stop(true,true).fadeOut();
})
})
})
效果如下:
如果您觉得本作品对您的学习有所帮助:
关键字:
网友三石 滑动插件 图文切换 开关灯特效 Jquery相册 QQ相册