Open menu on hover - not working

ok, thanks to this thread Hover dropdown menu on touchscreens

and a little changes (below) I have this workaround now.

 <script>
$('.w-dropdown').hover(function(evt) {
     	evt.preventDefault();
     	var openClass = 'w--open';
     	if (evt.type == 'mouseenter') { 
     		$(this).find('.w-dropdown-toggle').addClass(openClass); 
     		$(this).find('.w-dropdown-list').addClass(openClass); 
     	}
     	else if (evt.type == 'mouseleave') { 
     		$(this).find('.w-dropdown-toggle').removeClass(openClass); 
     		$(this).find('.w-dropdown-list').removeClass(openClass); 
     	}
     }); 
</script>
1 Like