I have an img, that does not have an id and is stacked something like this:
<div class = "someclass">
<div>
<div>
<img>
</div>
</div>
</div>
I am using the following jQuery selector to get the result :
$('.someclass div div img')
did not work, I also tried
$('.someclass').children('img')
that did not work either, and then I tried this ridiculous selector:
$('.someclass').children('div').children('div').children('img') ;
and that offcourse did not work.
How do I select that elusive img element, and where can I read up more in detail?
Try using jQuery’s find() method: