I need to generate some buttons dynamically based on some service response, and also apply some handlers when these buttons are clicked. So I use jQuery.live() for this, it works well for the first time.
But when I delete all the buttons using jQuery("<some container div>").empty() and creates these buttons again, now when I click the "call the handler twice" button, if I repeat the same thing, it starts three times and so same.
Can you guys help me, thanks in advance.
source share