jQuery 'on' not registering in dynamically generated modal popup
I was under the impression that jQuery's on event handler was meant to be able to 'listen' for dynamically created elements AND that it was supposed to replace the behavior of live . However, what I have experienced is that using on is not capturing the click event whereas using live is succeeding! The tricky aspect of my situation is that I am not only dynamically creating content but I'm doing it via an AJAX .get() call, and inserting the resultant HTML into a modal .dialog() jQueryUI popup. Here is a simplified version of what I was trying to accomplish (wrapped in $(document).ready(...) ):