$('div:first').is(':first') returns false, why?

lBeatzMakersa

New Member
This looks like a bug, but I'm not sure.As far as I know, jQuerys \[code\].is()\[/code\] method will just check if the selector string matches the element you call it on (if you pass in a selector string ofc...)If you full qualify the statement into\[code\]$('div:first').is('div:first')\[/code\]it will correctly return \[code\]true\[/code\], but.. here comes the facepalm for me:\[code\]$('div:last').is(':last')\[/code\]will again, correctly return \[code\]true\[/code\].Check it out: http://jsfiddle.net/d6UGw/
 
Top