I’m trying to “select” a img inside a $(this) selector. I know I can find it by using .find('img') but is this possible:
$("img",this) ?
What’s the most optimal way to do this?
Originally code
<a class="picture" href="test.html">
<img src="picture.jpg" alt="awesome">
</a>
Both
$(this).find('img')and$('img', this)are equivalent.From the docs:
http://api.jquery.com/jQuery/