Make dropdown items links clickable

As you can see, dropdown item links are used only like a toggle for dropdown menus. If you want to add links to these menu items, you should also add custom JavaScript.

Non-working links like these:

Custom JS code to get it working:

jQuery(function ($) {
    var $collapseBtn = $('.navbar-youplay [data-toggle="off-canvas"]');
    $('.navbar-youplay').on('click', '[data-toggle="dropdown"]', function (e) {
       if (this.href && $collapseBtn.is(':hidden')) {
          location = this.href;
       }
    });
});
Was this page helpful?