Reputation: 2752
I have created a jQuery UI accordion with some additional hyperlinks in its header. Now when I click one of the hyperlinks in the header the accordion opens up. How can I prevent that? I only want the accordion to open up when user clicks on any space in the header except for the hyperlinks that I added.
Upvotes: 2
Views: 1886
Reputation: 3247
Want to provide a js fiddle? It'd be very helpful. Where .links
is your selector.. Depending on what you want, you'd probably end up with something like this:
$(".links").bind("click", function (event) {
event.stopImmediatePropagation();
});
Or a preventDefault
or stopPropagation
for more info, check here: http://api.jquery.com/category/events/event-object/
Upvotes: 6