Using jQuery how to select one child? I looked at the Traversing API and know that I can select all immediate img children like this:
$(this).children('img');
And to select the first child img , I could use the following index:
$(this).children('img')[0];
But I'm probably surprised that I can not do this:
$(this).child('img');
Or am I missing something?
javascript jquery dom-traversal
Jonathon Watney Sep 24 '09 at 20:52 2009-09-24 20:52
source share