I\'m teaching myself AJAX to AJAXify my site. In my template, I have the following JS code to get some JSON data from a view then append the data to a div.
f
If you use ES6 anon functions, it will conflict with $(this)
$(this)
This works:
$('.dna-list').on('click', '.card', function(e) { console.log($(this)); });
This doesn't work:
$('.dna-list').on('click', '.card', (e) => { console.log($(this)); });