http://jsfiddle.net/eje7msuo/3/
When the mouseenter is on the red block, a green block will appear. It is necessary that the green block disappeared not only when mouseleave from the green block, but also from the red. But at the same time, so that, leaving the red block, going to green for the first time, the menu would not close.
|
1 answer
$('.showSubMenu').mouseenter(function(){ $('.SubMenu').show(); }).mouseleave(function(){ $('.SubMenu').hide(); }); $('.SubMenu').mouseenter(function(){ $('.SubMenu').show(); }).mouseleave(function(){ $('.SubMenu').hide(); }); upd: forgot about the transition, corrected.
- @daerokin, yes, yes, I corrected, I just forgot. - Bastiane
- Thank. It helped me. - daerokin
|