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
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);
});
});
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly