Make Parent Menu Items Clickable in Bootstrap 3 and 4

Make Parent Menu Items Clickable in Bootstrap 3 and 4

By default, Bootstrap parent menu is not clickable, its link only produces a dropdown menu where one can click sub menu’s link. But  we can make it clickable using some lines of jquery code ,  Adding a jQuery snippet give below will make your parent menu items clickable again!

jQuery('.dropdown-toggle').click(function() {

if($(window).width < 960){
var location = jQuery(this).attr('href');
window.location.href = location;
console.log(location);
return false;
}

});

I f you have bug then comment below , as we hack bootstrap navbar there is alway a chance for bug.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do you have any Query / Suggestion