Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12050 closed bug (invalid)

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.

Change History (3)

comment:1 Changed 11 years ago by [email protected]

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

comment:2 Changed 11 years ago by timmywil

Component: unfiledselector
Owner: set to 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: http://jsfiddle.net/FrKyN/. Open the link and click to "Fork" (in the top menu) to get started.

comment:3 Changed 11 years ago by scottgonzalez

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.

Note: See TracTickets for help on using tickets.