Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11929 closed bug (invalid)

cannot compare 9 and 10, 99 and 100, 999 and 1000 etc...

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


cannot compare 9 and 10, 99 and 100, 999 and 1000 etc... similarly you can check for other no's as well.

I'm passing two no's using 2 text boxes and trying to compare two values works fine most of the times. but fails when tried as above. and it works fine when i'm giving 09 and 10, 099 and 100, 0999 and 1000. it just compares same digit nos only. Blindly compares only units place when there is change in no of digits of any given number.

10>9 (returns false) 10>09 (returns true)

Change History (2)

comment:1 Changed 11 years ago by Rick Waldron

Owner: set to [email protected]
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 begin.

comment:2 Changed 11 years ago by dmethvin

Resolution: invalid
Status: pendingclosed

I think rwaldron is getting soft. Please ask for help on a place like StackOverflow or other forum where they can patiently walk you through the issues of comparing strings to each other. jQuery does not make any changes to the JavaScript comparison operators.

Note: See TracTickets for help on using tickets.