How to make bootstrap dropdown appear on hover instead of click?


I have a bootstrap dropdown on my website, it opens when a user clicks on it like this https://jsfiddle.net/od3n/8T6Vm/, now I need to show dropdown options on hover instead of click, how can I do it?

Thanks


Asked by:- manish
0
: 2166 At:- 2/17/2018 3:46:07 PM
CSS Bootstrap show dropdown list on hover







1 Answers
profileImage Answered by:- jaiprakash

You can use the below jQuery code to show dropdown on hover (Bootstrap 3.0):

$(document).ready(function(){
    $('ul.nav li.dropdown').hover(function() {
      $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(200);
    }, function() {
      $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(200);
    });  
});
1
At:- 2/18/2018 5:37:22 PM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use