I m 采用有购物袋的内冲器(#bagContainer)和一切都使用K。
function bagOver(){
$(this).find("#bagContainer").stop().fadeTo( fast , 1).show();
}
function bagOut(){
$(this).find("#bagContainer").stop().fadeTo( fast , 0, function() {
$(this).hide();
});
}
var bagHoverConfig = {
over: bagOver,
bagTimeout: 3000,
out: bagOut
};
$("#userBox .row:nth-child(2)").hoverIntent(bagHoverConfig);
But I need to add an "extra" close button (#bagCollapser) inside the bag, something like:
$("#bagCollapser").click(function () {
$( #bagContainer ).hide();
});
It closes #bagContainer, but it seems there is a conflict with hoverIntent:
- the button hides the bag, but then, after bagTimeout , hoverIntent hides it again
- if the bag has been closed via the button, it can t be shown again until hoverIntent s timeout/delay has passed...
Any ideas?
预祝福!