Bug Tracker

Opened 11 years ago

Closed 11 years ago

#3051 closed bug (duplicate)

jquery.eq() acts strange when passed a string

Reported by: nickmcclellan Owned by: flesler
Priority: minor Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

Description

From 1.2.6 source:

443 eq: function( i ) {
444 return this.slice( i, i + 1 );
445 }

This works fine when passed an integer. Selects a range when passed a string. For example:

.eq("1")

passes ("1", "11") to slice instead of (1, 2).

Change History (7)

comment:1 Changed 11 years ago by flesler

Resolution: invalid
Status: newclosed

http://docs.jquery.com/Traversing/eq#index

The index must be a number, that's how it's described on the docs.

comment:2 Changed 11 years ago by flesler

Resolution: invalid
Status: closedreopened

comment:3 Changed 11 years ago by flesler

Owner: set to flesler
Status: reopenednew

comment:4 Changed 11 years ago by flesler

Resolution: fixed
Status: newclosed

Applied the change at [5754].

comment:5 Changed 11 years ago by flesler

Resolution: fixed
Status: closedreopened

comment:6 Changed 11 years ago by flesler

Duplicate of #3102.

comment:7 Changed 11 years ago by flesler

Resolution: duplicate
Status: reopenedclosed
Note: See TracTickets for help on using tickets.