mouseover mouseout not working properly
Am trying show a modal on mouse over and close modal on mouse out. i give class for div and calling it on .hover.
but its like blinking. open close open close.
why this behavior??
even mouse is inside div 开发者_高级运维its closing .
$('.divclass').hover(function(){
dialog.open()
},
function(){
dialog.close()
});
i use mouse over and mouseneter .. same behavior like blinking..open close... Why?? any suggesion
I suggest you to try
$('.divclass').mouseenter(function() {
//dialog open
});
$('.divclass').mouseleave(function() {
//dialog close
});
In the css specify the dialog box as: pointer-events: none;
This prevents the dialog box from interfering with the hover action.
please try the below code if it works
$('.divclass').hover(
function () {
dialog.open();
},
function () {
dialog.close();
}
);
There is a hoverIntent plugin which is really useful, try if possible
精彩评论