Skip to main content
Rollback to Revision 2
Source Link
Richard de Wit
  • 7.4k
  • 7
  • 46
  • 56

$('.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(){ });
  1. it is more effective then $('.UPDATE').click(function(){ });
  2. it can use less memory and work for dynamically added elements.
  3. 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:

[enter image description here][10]enter image description here

$('.UPDATE').click(function(){ }); V/S $(document).on('click','.UPDATE',function(){ });

[enter image description here][10]

$('.UPDATE').click(function(){ }); **V/S**    
$(document).on('click','.UPDATE',function(){ });

$(document).on('click','.UPDATE',function(){ });
  1. it is more effective then $('.UPDATE').click(function(){ });
  2. it can use less memory and work for dynamically added elements.
  3. 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:

enter image description here

**$(document).on('click','.UPDATE',function(){ });** 1)it is more effective then $('.UPDATE').click(function(){ }); 2)it can use less memory and work for dynamically added elements. 3) some time dynamic fetched data with edit and delete button not generate JQuery even
Source Link
$('.UPDATE').click(function(){ }); **V/S**    
$(document).on('click','.UPDATE',function(){ });

$(document).on('click','.UPDATE',function(){ });
  1. it is more effective then $('.UPDATE').click(function(){ });
  2. it can use less memory and work for dynamically added elements.
  3. 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:

$('.UPDATE').click(function(){ }); V/S $(document).on('click','.UPDATE',function(){ });

enter image description here [enter image description here][10]

$('.UPDATE').click(function(){ }); **V/S**    
$(document).on('click','.UPDATE',function(){ });

$(document).on('click','.UPDATE',function(){ });
  1. it is more effective then $('.UPDATE').click(function(){ });
  2. it can use less memory and work for dynamically added elements.
  3. 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:

enter image description here

$('.UPDATE').click(function(){ }); V/S $(document).on('click','.UPDATE',function(){ });

[enter image description here][10]

Format code
Source Link
Stephen Rauch
  • 49.3k
  • 31
  • 113
  • 139

$('.UPDATE').click(function(){ }); V/S $(document).on('click','.UPDATE',function(){ });

$(document).on('click','.UPDATE',function(){ });

  1)it is more effective then $('.UPDATE').click(function(){ });
  2)it can use less memory and work**V/S** for dynamically added elements.
  3$(document) 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.on('click', that time'.UPDATE',function(){ });
       
$(document).on('click','.UPDATE',function(){ }); is effectively work.[like same fetched data by using jquery. button not working at time of update or delete[enter image description here][10]
  1. it is more effective then $('.UPDATE').click(function(){ });
  2. it can use less memory and work for dynamically added elements.
  3. 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:

enter image description here

$('.UPDATE').click(function(){ }); V/S $(document).on('click','.UPDATE',function(){ });

$(document).on('click','.UPDATE',function(){ });

  1)it is more effective then $('.UPDATE').click(function(){ });
  2)it can use less memory and work for dynamically added elements.
  3) 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[enter image description here][10]
$('.UPDATE').click(function(){ }); **V/S**    
$(document).on('click','.UPDATE',function(){ });
 
$(document).on('click','.UPDATE',function(){ });
  1. it is more effective then $('.UPDATE').click(function(){ });
  2. it can use less memory and work for dynamically added elements.
  3. 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:

enter image description here

Source Link
Loading