
这是一款橙色的选项卡切换样式特效,jQuery纵向鼠标经过tab选项卡内容切换代码。
js代码
<script type=\"text/javascript\" src=\"js/jquery-1.8.3.min.js\"></script>
<script type=\"text/javascript\">
$(\'.o-m .ul-o li\').hover(function () {
var linum = $(this).index()
$(\'.o-m .ul-t li\').eq(linum).stop().show().siblings().hide()
})
$(function () {
var slip = $(\'.li-mask\');
var a = $(\'.o-m .ul-o li:first\');
//初始化滑块
slip.css({
\'top\': parseInt(a.position().top) + \'px\'
});
$(\'.o-m .ul-o li\').mouseenter(function () {
//显示滑块
if (slip.css(\'display\') == \'none\') {
slip.show();
};
//移动滑块
slip.stop().animate({
top: parseInt($(this).position().top) + \'px\'
}, 300);
});
});
</script>










暂无评论内容