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

分类: Javascript 评论(1) 浏览(75925)

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 20

留下你的看法: