After asking this question : jQuery die() does not work. I found that live()
does not seem to behave like bind()
.
I had the following line:
$('.produit').die().live('change',function(){ // the rest
$('.produit').live('change',function(){ // that did not work either
Then I changed it to:
$('.produit').unbind('change').bind('change',function(){ // the rest
What is the difference between the two lines.
In this example .produit
is added dynamically to the page. And the binding is done after the prepend()
.
I'm using jQuery 1.4.2, and IE7.