If you include a list of Ajax updates in your page, you need to be careful about event handling in the Inactive Update section.
Take the example of a list interface with a common toolbar:
| Menu1 | Menu2
----------------------------------------------------------------------------
ID TITLE DESCRIPTION OPERATION
1 test1 Hey test X-...
2 Test2 why not X-...
----------------------------------------------------------------------------
1 2 3 4 5 6 7 8 9 10 11-12 |
$.ajax (.... Data: {...}, success:function (data) {$ (' Menu1 '). Click (function () {//do something}); } ) |
Because the MENU1 interface is partially public and does not reload as the list data is updated, the above code produces a duplicate Click event trigger (after updating the list more than once).
So we should note that in the processing of the results of the AJAX list update, you cannot include the reinitialization of the tool bar event listening.