I know about jquery .on() use and purpose, because I use it.
But I want to know what is the difference between $(document).on()
vs $(element).on()
$(document).on('click','.btn-edit',function()
This binds a click event to the document and all child elements within it. This method is referred to as delegated event handling.
$('#table-user').on('click','.btn-edit',function()
binds the click event to the #table-user directly. captures the event directly on the element.