jQuery 1.3 loses event handlers when appending to multiple elements

Demo:

Code:

$(function() {
  $('li').append($("<button/>")
    .text("click me")
    .click(function() {
      alert("Good job!");
    })
  );
});

Problem:

In jQuery 1.2.6, all three buttons would cause an alert box to be shown. In 1.3.1, only the first does - the click handler does not appear to get copied to the other buttons.

This is ticket #4161.

Back to Browser Bugs