Change css of Dynamically created element?
Hi. I'm having a little trouble understanding why I can't manipulate the css of a newly created element. I've created the element, targeted(I assume with .on) and the assigning addition css traits. But it's not working
http://jsfiddle.net/skfn8m3o/1/
- $("body").on("click", ".frameContainer", function () {
var clickedID = $(this).attr("id");
alert(clickedID);
$("#" + clickedID).css({"background-color":"black"});
});
I don't understand the process here. How come the CSS isn't being applied via this route?