I have a node Express app that uses some javascript in the app's view file.
I am trying to handle an element's onClick event...
This method works:
$(document).on('click', '#dialog-continue', function () {
alert('here')
});
This method does not work:
$('#dialog-continue').on('click', function () {
alert('here')
});
Can anyone tell me why the second method doesn't work?
Thank you for your time :)