Reputation: 271824
$("#start").find(divs where class=desc).show()
<div id="start">
<div class="desc" style="display:none;">I am visible.</div>
</div>
How do I do that?
Upvotes: 1
Views: 124
Reputation: 10392
$("#start.desc").show();
Visit http://jsfiddle.net/9cg8D/ for the working example.
Upvotes: -2
Reputation: 344575
Just like the jQuery()
function, find()
takes a CSS selector as an argument.
$("#start").find("div.desc").show();
find
is the equivalent of context searching, so the above is the same as:
$("div.desc", "#start").show();
Upvotes: 8