document.getElementById ().onClick () not firing on click
When you do document.getElementById ('add-card') you get back a Node, not a jQuery object, so there is no onClick (although there is onclick, but it's better to use addEventListener). If you do $ ('#add-card') you get back a jQuery object, so you can use jQuery methods on it. Share Improve this answer Follow edited Apr 23, 2018 at 19:31