bind jquery events to ajax'd content with livequery


/ Published in: JavaScript
Save to your folder(s)

#modal would be the bodyID of your modal window. I use jqmodal so it strips out all the header tags, and takes your body ID and turns it into a div.


Copy this code and paste it in your HTML
  1. $().ready(function() {
  2.  
  3. /* use livequery to bind events to stuff that wont see the dom */
  4.  
  5. $("#modal").livequery(function() {
  6.  
  7. /* do your business here */
  8.  
  9. });
  10.  
  11. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.