.toggle disables links
.toggle disables links
I'm not sure wether this is how it's supposed to be or if one of the implementations is wrong, but here's the deal:
Assuming #x and #y are links.
- $("#x").click(function() {
- $("#xi").show("fast");
- });
This results in #xi being displayed and the link being triggered, making you follow the link.
- $("#y").toggle(function() {
- $("#yi").show("fast");
- }, function() {
- $("#yi").hide("fast");
- });
This results in #yi being displayed and the link not being triggered, you don't follow the link.
You can see it in action here (hold ctrl while clicking so the popup doesn't get blocked): http://jsbin.com/eyaca/3
Long story short, .toggle disables anchors.
Should I submit a bug ticket?