I have a bit of code that looks like this:
<div class="monkey"><input class="toots"></div>
My attempt at selector looks like this:
if ($("div.monkey>'input[class=toots]'"))
{ //something }
This is wrong…How is it supposed to look?
Note that the div may or may not exist so it is a condition I am seeking out in my form.
Thanks 🙂
Remove the single quotes and treat ‘toots” as a class instead of a property:
$("div.monkey > input.toots")