Dropdown Menu Parent link Clickable

Dropdown Menu Parent link Clickable

Change the CSS

dropdown:hover .dropdown-menu {
  display: block;
}

Add Jquery Code

$(‘.dropdown-toggle’).click(function() {
    var location = $(this).attr(‘href’);
    window.location.href = location;
    return false;
});

Change in the nav walker class

//$atts[‘href’] = ‘#’;
                $atts[‘href’] = ! empty( $item->url ) ? $item->url : ”;
             // $atts[‘data-bs-toggle’] = ‘dropdown’;
               $atts[‘data-bs-hover’] = ‘dropdown’;

One thought on “Dropdown Menu Parent link Clickable

Post Your Comments & Reviews

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

*

*