Is there an event jquery fires on a dom element when it is inserted into the dom?
E.g. lets say I load some content via ajax and add it to the DOM and in some other
The .livequery() plugin still serves this niche need, like this:
$('.myClass').livequery(function() {
alert('.myClass added to dom');
});
If you pass it just a callback function like above, it'll run for each new element it finds, both initially and as they're added. Inside the function this refers to the just-added element.
.live() listens for events that bubble, so doesn't fit this "when elements are added" situation, in that respect, .livequery() (the plugin) wasn't completely replaced by the addition of .live() to core, only the event bubbling portion (for the most part) was.