tags:

views:

30

answers:

2

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

A: 

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 http://cherne.net/brian/resources/jquery.hoverIntent.html

gov
mouseover of dialog box becomes , mouseoout of intial div block , that is the reason your dialog box is getting closed.
gov
A: 

I suggest you to try

$('.divclass').mouseenter(function() {
  //dialog open
});

$('.divclass').mouseleave(function() {
  //dialog close
});
Pedro Gil