This worked when content was NOT added via ajax
$('#element a img').css({ 'opacity': '0.5' });
However it doesn’t work when the elements are added via an ajax call. I am familiar with live and bind, but those are for events.
After I add the elements via ajax, I need to do some initialization like adding a span to first one and also setting the opacity on the newly added items, etc.
How can I initialize elements added via ajax?
Try setting the css rules in the Ajax complete handler, when the element actually exists on the page: