I’m trying to capture events from buttons that are generated into a div (feeded by another jQuery call). I wonder where the jQuery calls should be? Into the main page or into the generated html from the previous jQuery call?
Also, how jQuery deals with objects that have the same names?
Thanks!
If you are working with objects that exits now or in the future, you have to use the live function to attach your events:
http://api.jquery.com/live/
Description: Attach an event handler for all elements which match the current selector, now and in the future.
If you have multiple objects that match the selector you will get an array of objects