[jQuery] Var and a child
[jQuery] Var and a child
I am trying to var to work as a selector along with an additional
class, but I must have something wrong.
var myVar = "#testDiv";
$(myVar ".statusColor").css("background-color","#DBF18A");
<div id="testDiv">
<span class="statusColor">Test</span>
</div>
I need to select the child of the myVar, but the selector seems to be
incorrect.