<script type="text/javascript">
$(".Banner ul li").bind('mouseover', function()
{
var cur = $(this).index();
function action()
{
$(".Banner ol li").eq(cur).fadeIn(800);
$(".Banner ol li").eq(cur).children("b").fadeIn(800);
}
handle = setTimeout(action, 500);
}).bind('mouseout', function()
{
clearTimeout(handle)
});
</script>
导航:
var navFun = function() {
var mouseover_tid = [];
var mouseout_tid = [];
$(".header .nav li").each(function(index) {
$(this).hover(
function() {
var _self = this;
clearTimeout(mouseout_tid[index]);
mouseover_tid[index] = setTimeout(function() {
$(_self).addClass("hover").children().children("i, .nav-show").fadeIn(300);
}, 200);
},
function() {
var _self = this;
clearTimeout(mouseover_tid[index]);
mouseout_tid[index] = setTimeout(function() {
$(_self).removeClass("hover").children().children("i, .nav-show").fadeOut(300);
}, 200);
})
})
}
navFun();