js代码
$('.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);
});
});