why does calling methods on a div fire the live click event
Posted
by oo
on Stack Overflow
See other posts from Stack Overflow
or by oo
Published on 2010-05-13T10:20:57Z
Indexed on
2010/05/13
10:24 UTC
Read the original article
Hit count: 196
jQuery
|jquery-events
i have this jquery code:
$(this).parent('.copyFoodInstance').attr("myset", "0");
$(this).parent('.copyFoodInstance').html("<img BORDER=0 src='../../images/copy1.png' />");
it seems that when i call this code, this event fires:
$(document).ready(function() {
$('div.copyFoodInstance').live('click', function() {
does anyone know why this event fires from the lines above? is there anyway to stop if from firing? All i am doing is updating an attribute on the div and updating the html. this shouldn't fire a click event?
© Stack Overflow or respective owner