Hi I have a Ajax call that I'm doing with jQuery and was wondering what is the difference between these methods on selecting an element on click,
FIRST
$(this).on('click', 'button', function (){ });
SECOND
$('button').on('click', function (){ });
THIRD
$('button').click(function { });
My Ajax call selects new data from my database and updates the content on success and changes the data from a data object that I have on the button with an ID, the first on works but the second and third once both only work once and then it fails and I'm am wondering why, thanks a lot in advance!