Is there is a way to only let the inner element of a listitem
do something?
I have list elements that can contain a
tags with a certain cla
Solution from Author:
I added all the a tags like above, so no mixup with live anymore.
$(markers).each(function(i,marker){
listitem = $("")
.html("Location ")
.click(function(e){
showLocation(marker, i);
})
.appendTo("#somelist");
$("")
.html(""+ids[i]+"")
.addClass('ol id')
.click(function(){
$('#ginfo').show();
return false;
})
.appendTo(listitem);
Here is an interesting page to explain event bubbling: How to stop event bubbling with jquery live?