Skip to main content

Bug Tracker

Side navigation

#12050 closed bug (invalid)

Opened July 10, 2012 03:16PM UTC

Closed July 10, 2012 03:31PM UTC

Jquery :lt Selector

Reported by: anonymous Owned by: anonymous
Priority: low Milestone: None
Component: selector Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

I have ten rows in a table with a text box in each cell. I'm attempting to select every input except those that are in the last row. Each row has the class "class1", each input has the class "class2".

This is the segment that's having issues:

var numRows = 10;

$('.class1:lt('+numRows-1+') .class2').each(function(){

Error message reads: "Uncaught Error: Syntax Error, unrecognized expression: NaN)"

at line 4267.

Attachments (0)
Change History (3)

Changed July 10, 2012 03:17PM UTC by comment:1

Also - forgot to enter an email - you can reach me at with any questions.

Changed July 10, 2012 03:20PM UTC by timmywil comment:2

component: unfiledselector
owner: → anonymous
priority: undecidedlow
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: Open the link and click to "Fork" (in the top menu) to get started.

Changed July 10, 2012 03:31PM UTC by scottgonzalez comment:3

resolution: → invalid
status: pendingclosed

string + number - number = (string + number) - number, which is not what you want. Please us the forums or StackOverflow if you need more help.