Using jQuery how do I select a single child element? I've looked at the Traversing API and know I can select all the immediate children img
elements like this:
$(this).children('img');
And to select the first child img
element I could use a subscript like this:
$(this).children('img')[0];
But I guess I'm kind of surprised I can't do this:
$(this).child('img'); // no subscript, returns single element
Or have I missed something?