For some reason changing the format of the below jQuery event handler code for a larger .js file seems to make the on click event work, but technically both ways should be valid.
$('[data-onclick="flyTo"], [data-onclick="flyToAndClick"], [data-onclick="flyToThenClick"], [data-onclick="flyToAndAction”]’).on(‘click’, function(e) {
vs
$(document).on('click', '[data-onclick="flyTo"], [data-onclick="flyToAndClick"], [data-onclick="flyToThenClick"], [data-onclick="flyToAndAction"]', function(e) {
This seems like such a trivial change, but I really want to understand what's happening here.
Cheers for any help!