I am a noob in Jquery and I am playing around with the different selectors and functions right now. I am trying to do this
$('li').first();
on firefox console and I got
TypeError: $("li").first is not a function
when
$('li')
returns
Object { length=8, 0=li, 1=li, more...}
what am i doing wrong?
You said in a comment that you’re using jQuery 1.2.1, which is ancient (over four years old).
The documentation states quite clearly that
.first()was added in jQuery 1.4.