延迟的浮动层,移上去持续显示
2012-1-30 18:35 Monday  

分类: Javascript 评论(0) 浏览(8216)

Js

function showbatchbuy(pid){
    $("#p"+pid).show();
    clearTimeout(batchbuy);
}

function hidebatchbuy(pid){
    batchbuy = setTimeout(function(){
        $("#p"+pid).hide();
    },500);
}

触发的

onmouseover="showbatchbuy({$item.id});" onmouseout="hidebatchbuy({$item.id});"

层上面的

onmousemove="showbatchbuy({$item.id});" onmouseout="hidebatchbuy({$item.id});"

+1 2

留下你的看法: