Ticket #10982 (closed bug: invalid)
In IE (6/7/8) had the following error:"Invalid argument. Line: 8826 Char: 5" on jquery-1.7.1.js
| Reported by: | joao.l.castro@… | Owned by: | joao.l.castro@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Solved by checking if "fx.now" is NaN
Change History
comment:1 Changed 19 months ago by sindresorhus
- Owner set to joao.l.castro@…
- Status changed from new to pending
comment:2 Changed 18 months ago by anonymous
Had the same issue on IE with jQuery returning an error for a missing/invalid argument. It was caused by a call $(element).show() after a $(‘document’).ready().
I fear IE completely misses to pass some element feature (width? display status? visibility status?), or in some way those features are not readable to IE, or become available slight AFTER the .ready() is called.
Anyway, removing that .show() solved the whole thing.
comment:6 Changed 18 months ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
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!
comment:7 Changed 17 months ago by cr125rider
I have the same bug happening. The bug you reference as a duplicate, points to this bug as it's duplicate (circular duplicate reference :( ) Anyone find an fix for this?
comment:8 Changed 17 months ago by cr125rider
I found a fix, in jQuery 1.7.1. fx.now somehow gets set to NaN. I don't know much about jQuery internals, but I can hack together a quick fix:
Starting at Line 8824
_default: function( fx ) {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
if(isNaN(fx.now)) fx.now = fx.start; //Fix line
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
} else {
fx.elem[ fx.prop ] = fx.now;
}
}
comment:9 Changed 17 months ago by dmethvin
That's great! All we need now is to know the cause. Please post a test case, as mentioned in comment 1 above.
comment:10 Changed 16 months ago by Hw2k
Not sure if this is the common cause, but I managed to reproduce the error by accidentally setting the animate value to Infinite when calculating the top position with percentages, simplified example here: http://jsfiddle.net/HdyFB/8/
I guess it's no wonder the animation doesn't work, but a more helpful error message would be nice, rather causing an javascript error in IE<9
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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.