i have a piece of code that inserts new objects into the DOM. these objects are of the same class as other objects already in the DOM to which jquery has bound. how do i get these new objects to bind the same as the existing ones? in other words... let's say i have this:
$('.foo').click(function() { doSomething()}); when i insert new ".foo" objects, i want them to also have their click event bound to doSomething(). is there a built-in jquery method to do this? or do i simply need to do the binding as the new object is added? thanks!