$('.UPDATE').click(function(){ }); V/S $(document).on('click','.UPDATE',function(){ });
$('.UPDATE').click(function(){ }); **V/S**
$(document).on('click','.UPDATE',function(){ });
$(document).on('click','.UPDATE',function(){ });
- it is more effective then $('.UPDATE').click(function(){ });
- it can use less memory and work for dynamically added elements.
- some time dynamic fetched data with edit and delete button not generate JQuery event at time of EDIT OR DELETE DATA of row data in form, that time
$(document).on('click','.UPDATE',function(){ });
is effectively work like same fetched data by using jquery. button not working at time of update or delete: