I am trying to initiate a function when a click event happens on a link within a list. This is for a menu.
Right now, I have this and it works:
$(".left-navigation-holder li a:has(~ul)").click(toggleMenu);
Basically, the click event initiate toggleMenu if the link clicked has a list (ul) down the tree. Now, I would also have this to happen only if that link href attribute is equal to nothing. I am trying this but doesnt work:
$(".left-navigation-holder li a.attr(href=''):has(~ul)").click(toggleMenu);
Any help would be much appreciated, thank you.