I have a page with some inputs of the foobar class, and I call a method for each of them.
$("input.foobar").css('color', 'red');
and I add additional .foobar inputs to the page with javascript.
How can I use jQuery live (or any other method) to browse the page to create new elements that match "input.foobar" and execute my css call on them as soon as they are added to the DOM?
I got confused because the work seems to work by adding an event handler, but I don't know how to describe the event the item was created.
Thank.
source
share