Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

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(jQuery(window).width < 960){
    var location = jQuery(this).attr(‘href’);
    window.location.href = location;
    console.log(location);
    return false;
    }
 });

If you have bug then comment below , as we hack bootstrap Navbar there is always a chance for bug.

Leave a Reply

avatar

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

  Subscribe  
Notify of
Do you have any Query / Suggestion