Skip to main content

Bug Tracker

Side navigation

#6497 closed enhancement (worksforme)

Opened April 28, 2010 12:57PM UTC

Closed August 04, 2010 02:36AM UTC

.first() and .last() methods do not work if .children() returns only 1 child node.

Reported by: tubalmartin Owned by:
Priority: Milestone: 1.4.3
Component: traversing Version: 1.4.2
Keywords: children, first, last Cc: web@margenn.com
Blocked by: Blocking:
Description

If the method .children() returns just one child node .first() and .last() methods will not return the only child node its parent node has, instead they both will throw an error.

IMHO if just one child node is returned by .children(), both methods should return the only child node its parent has.

Excellent work by the way guys, jQuery rocks!!!

Attachments (1)
  • test-6497.html (0.4 KB) - added by dmethvin August 04, 2010 02:37AM UTC.
Change History (1)

Changed August 04, 2010 02:36AM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

I tried to create a test case from your verbal description and it seems to work for me. It's *always* best to attach a test case and note which browsers you've tried.