If you include a list of ajax updates in the page, you need to be careful about event handling in the non-dynamic update section.
Take the list interface with a public toolbar as an example:
| Menu1 | Menu2
----------------------------------------------------------------------------
ID TITLE DESCRIPTION OPERATION
1 test1 hey test X - ...
2 test2 why not X - ...
----------------------------------------------------------------------------
$.ajax( .... data: { ... }, success: function(data) { $('Menu1').click( function(){ //do something } ); } )Since the Menu1 interface part is public and will not be reloaded as the list data is updated, the above code will generate a duplicate click event trigger (after multiple updates to the list).
So we need to note that in the result processing of ajax list update, the reinitialization of toolbar event listening cannot be included.