JSFiddle - React, Tailwind, and code Playground
HTML
<a href='http://example.com'>This one works! (if you click, it will preventDefault)</a><br/>
JavaScript
$('a').click(function(e) {
e.preventDefault()
});
$(document.body).append($('<a href="http://example.com">This one doesn\'t because I just added it :(</a>'))
//now when I click that example link, the function isn't called!