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.
If you use IE there is some problem with live and
changeeventsearch for
livequeryplugin which solves this.try to change the event to
Clickevent and youll see that it works.The difference is that Bind is for Already In Page elements and live is also+Future elements.