It should work, now that you fixed it! (Please do not edit your post
after you make it - make a new comment.)
When you first posted, you had:
$(clickedID).css({"background-color":"black"});
I
see now you've changed it to:
$("#" + clickedID).css({"background-color":"black"});
(You didn't update
your Fiddle, though)
But
you don't need to use the ID at all:
-
$("body").on("click",
".frameContainer", function () {
$(this).css("background-color",
"black"});
});