I might be confused but it seems like sometimes one of these two ways works when the other one fails.
Let's say the html is like this:
<div class="content">
<div class="nestedDeep">
<div class="clickMe">ClickMe</div>
</div>
</div>
</br>
<div class="clickMe">ClickMe</div>
Am I imagining it or is there a clear difference between saying:
<script>
$('.content .clickMe').click(function () {
alert('you clicked');
});
</script>
Or saying:
<script>
$('.content').find('.clickMe').click(function () {
alert('you clicked');
})
</script>
Is one of those methods preferable over the other and if so, what's the main difference?