Re: [jQuery] How to ignore propogated events

2007-03-07 Thread Edwin Martin
Peter Gordon schreef: > This is the code when the item is clicked. > > $("li").bind("click", function(){ >alert( $(this).text() ); event.stopPropagation(); > }); > > The problem is that when I click on a leaf, not only do I get an event > for that leaf, but I get an event for each parent. >

[jQuery] How to ignore propogated events

2007-03-07 Thread Peter Gordon
Hi. I am using JQuery 1.1.1 I have the following structure (taken from treeview) and want something to happen when an item is clicked. Item 3.0 Item 3.0.0 Item 3.0.1 Item 3.0.1.0 Item 3.0.1.1 Item 3.0.2