Select a dynamically created element ?

Select a dynamically created element ?

It has a classname of listitem so I tried it like this:

$(".listitem").css("background-color","transparent").removeClass('selected');


Does nothing!