I
I
Ivan Erokhin2018-02-05 00:42:46
JavaScript
Ivan Erokhin, 2018-02-05 00:42:46

Modal disappears on hover?

There is a modal window that appears when you hover over a menu item.
So sometimes (not always) when you click inside the modal window - it disappears.
.menu_profile - menu item
#modal_user - modal window


$('.menu_profile, #modal_user').hover(
function(){
$('#modal_user').css('display', 'block');
$('#modal_user').offset({top:$ ('.menu_profile').offset().top+39,left:$('.menu_profile').offset().left})
},
function(){
$('#modal_user').css('display ', 'none');
}
);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question