What is the difference between these two snippets?
$('button').on('click', function () {
alert('you clicked the button!');
});
$('button').click(function () {
alert('you clicked the button!');
});
What is the difference between these two snippets?
$('button').on('click', function () {
alert('you clicked the button!');
});
$('button').click(function () {
alert('you clicked the button!');
});