How to run code when elements are attached like jQuery's live() do with events?

Posted by muhuk on Stack Overflow See other posts from Stack Overflow or by muhuk
Published on 2010-04-20T09:35:55Z Indexed on 2010/04/20 10:13 UTC
Read the original article Hit count: 162

I would like to run some code right after a certain set of elements are attached. jQuery.live() allows you to bind event handlers to elements, even if they are created later. But AFAIK there is no suitable method to do something like the following:

$("some selector").live("attach", function() { $(this).whatever(); });

How can I accomplish this?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about javascript-events