Stephen Goeddel's Blog
Web Development, Java, Django, Mobile App Development, and anything else that I find interesting.
Dynamically bindable click events
- Using JQuery to bind events to elements that do not exist on page load
- Nov. 9, 2014, 12:39 p.m.
When building a dynamically AJAX driven web app it is occasionally necessary to bind an event, such as a click, to an element that does not exist in the DOM on page load. Imagine that an AJAX call is made for a newly added object and a button is added to the HTML: