thejoker101
6 Nov 2006, 12:59 PM
This question is a 'how should I go about doing this thing' kind of question.
I have code that takes a few filter options and sends them to a php script via an ajax call and returns a list of images and places that list in the page. I'd like to have a listener on each one of those images. What is the best way to go about doing this?
I was thinking that once the html is inserted into the page, i can do a search for a class that i put on each image and then add a listener to each image that way, but that seems like that is pretty cumbersome and that there should be an easier/better way of doing it.
Does this question make sense?
I have code that takes a few filter options and sends them to a php script via an ajax call and returns a list of images and places that list in the page. I'd like to have a listener on each one of those images. What is the best way to go about doing this?
I was thinking that once the html is inserted into the page, i can do a search for a class that i put on each image and then add a listener to each image that way, but that seems like that is pretty cumbersome and that there should be an easier/better way of doing it.
Does this question make sense?