Since the live() method is deprecated as of version 1.7, I started going through my source and converting all of my live event handlers over to on(). I was under the impression that the change would be simple and everything would work as it had before; however, I ran into some code that doesn't behave as it should.
I have the following jQuery select to bind the click event of a table tag...
$('table.accordion-header').live("click", function ($e) {
// gobs of code
}
... and it works just fine (ie - my table tag click event is raised even after asynchronous postbacks on the page occur). But if I change the code to the following
$('table.accordion-header').on("click", function ($e) {
// gobs of code
}
then the click event is no longer raised after any asynchronous postbacks on the page occur. Please note - the click event does work up to any asynchronous postbacks, but afterwards it no longer works. So what am I missing here?