Skip to main content

Bug Tracker

Side navigation

#5073 closed bug (invalid)

Opened August 19, 2009 01:13PM UTC

Closed October 27, 2010 10:40PM UTC

eq(n) has issues when spaces present

Reported by: hpoom Owned by: john
Priority: low Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: eq spaces Cc:
Blocked by: Blocking:

Code like:

$( 'img:eq(1)' ).hide();

works fine, but this code:

$( 'img:eq( 1 )' ).hide();

does not work. Spaces should be acceptable inside the eq to allow both eq(n) and eq( n )

In our coding guidelines it states spaces must be present between all brackets to make the code clearer, but now I have break out coding guidelines to make my eq work.

Please fix

Attachments (0)
Change History (2)

Changed October 03, 2009 01:06AM UTC by dmethvin comment:1

See also #5144

Changed October 27, 2010 10:40PM UTC by rwaldron comment:2

priority: minorlow
resolution: → invalid
status: newclosed

Documented selector syntax does not purport the allowance of spaces in selector strings. The space is generally regarded as descendant selector syntax