On Apr 10, 2007, at 12:48 PM, Mika Tuupola wrote:
http://www.appelsiini.net/~tuupola/jquery/bugs/click-1.1.2.html
Problem is clicking li element in sibling list will hide sibling
(itself). Loggin to console shows (check element id) that the click
event was fired on parent element.
Question is, is the click event leaking out from sibling or is this
expected behaviour?
Ahem. Fix for my case was simple. Bind event to a not li...
-cut-
$("ul.style3 > li > a").bind("click", function(e) {
e.preventDefault();
$(this).parent().children("ul").slideToggle(50);
$(this).parent().toggleClass("open");
});
-cut-
--
Mika Tuupola http://www.appelsiini.net/~tuupola/