Posted By

Meander365 on 08/04/09


DOM jquery livequery binding

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Match Elements Even When DOM Changes

 / Published in: jQuery


If you want to trigger an event on an matched element and that element may be introduced into the DOM from an Ajax request, you can still match against it by using the livequery plugin and the following code.

  1. $('.myClassToMatchAgainst').livequery(function(event) {
  2. //do this
  3. });

Report this snippet  

You need to login to post a comment.