Answer the question
In order to leave comments, you need to log in
How to fix menu flickering in bootstrap when using hover effect and javascript?
Hello.
I was looking for a way to implement a dropdown menu with hover effect in bootstrap 3.
I found this solution:
$( document ).ready(function() {
$( 'ul.nav li.dropdown' ).hover(function() {
// $( window ).width() >= 768
if ($('.navbar-toggle').css('display') === 'none'
&& false === ('ontouchstart' in document)) {
$( '.dropdown-toggle', this ).trigger( 'click' );
}
}, function() {
if ($('.navbar-toggle').css('display') === 'none'
&& false === ('ontouchstart' in document)) {
$( '.dropdown-toggle', this ).trigger( 'click' );
}
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question