Skip to main content

Bug Tracker

Side navigation

#10483 closed bug (invalid)

Opened October 12, 2011 02:06PM UTC

Closed October 27, 2011 08:14AM UTC

Last modified October 26, 2012 08:28PM UTC

NAN value on 1.6.4 version

Reported by: Hagau Ioan Owned by: Hagau Ioan
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:


I used the "slideToggle" from jquery version "jquery-1.6.4.min.js" on one big DIV element.

The "DIV" element has inside more html elements.

In internet explorer 8 (maybe on FF too) when I try to load the slideToggle function on this big DIV I received an error. Not sure what was the real cause of error but during my investigation I found a bug into the jquery:


There are situations when "a" variable is "NAN". Because of this I got some errors.

So I placed this check routine inside:


And all my problems gone.


Attachments (0)
Change History (4)

Changed October 12, 2011 02:12PM UTC by dmethvin comment:1

owner: → Hagau Ioan
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!

There are situations when "a" variable is NaN

We need to know the inputs that would cause this problem, the test case will make this clear.

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 October 27, 2011 08:14AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed July 26, 2012 06:51AM UTC by anonymous comment:3

Had the same problem. But this fix seems to work. Don't know what causes "a" to be NaN though. Still fairly new to jQuery.

Changed October 26, 2012 08:28PM UTC by anonymous comment:4

I ran into the same issue, but I do not have jsFiddle in my application. Instead I wrote my own code that targeted to center a div popup box by accessing width, height, outerWidth, and outerHeight from the window object and the div popup box itself.

It is clear that the issue happens in IE8 browser, currently I am testing on version 8.0.6001.19019.

So I went ahead and implemented the fixings accordingly instructions above and it solves the case. My div popup box still is being centered hen I scroll the window down and up.

The very same issue was found in the more recent jQuery versions which means that bug prevents jQuery being cross browser compatible for IE8. Any new release of jQuery requires to be touched in other to preserve backward compatibility, until IE8 has being killed.

Here are the details where I implement that fix.

jQuery-1.4.2.min.js (line:144 Column:175)

jQuery-1.4.4.min.js (line:156 Column:251)

jQuery-1.7.1.js (line:8824 Column:31)

At the moment I am writting whit comment, jQuery-1.8.0 is already available for download. I inspected the code and it looks away different. I did not test yet, but comments about backward compatibility are in place.

Probably issue is fixed in the 1.8.0 version, anyway I hope this comment help people find solution for the bug when using old jQuery versions.