In this situation, I will use .find ():
$("#orderedlist").show().find("li").css("color", "red");
But if #orderedlist is visible, and I just wanted to change the color directly
on red i would use$("#orderedlist li").css("color", "red");
I think this is just a question of what you are doing.
source
share