I have some HTML like this:
<div id="MyDiv">
<div class="Class1">
<div class="SClass1"></div>
</div>
<div class="Class2"></div>
</div>
Is there any difference between
$('#MyDiv').find('.SClass1').show();
and
$('#MyDiv .SClass1').show();
in you case, using
find()is pretty senseless (except for readability – but anyone will have another opinion on that). i only usefind()in cases where it’s really needed, like:where something has to be done with the parent-element first and something else with one or more of its children.