Why does $ ("img") [0] not work?
4 answers
To directly answer your question:
This does not work because it [0]returns a native selector DOM element that does not have a method called .attr(). You need to use .eq(index)one that basically extracts the indexth element from the elements represented $(). Note that it $()returns an object that looks like an array, not a per-se array (therefore it [0]does not work out of the box)
+7
Jquer...">