I really dont know why this is not built in - its simply a no brainer that you want to close the dropdown when you click the link. Its astonishing.
Anyway, ive tried everything. this is the latest:
$(‘.dropdownmenuitem’).on(‘click’, ‘a’, function() {
$(‘.dropdownmenu’).triggerHandler(‘click’);
});
Doesnt work. Tried the other way to remove the w–open from all div and nav but then I face this annoying issue that I need to click twice on the dropdown to open it again.
Please any help really appreciated. Such a simple thing is turning out to be hell.
Here is my site Read-Only: LINK
(how to share your site Read-Only link)