Skip to main content

Bug Tracker

Side navigation

#9758 closed bug (invalid)

Opened July 06, 2011 12:20PM UTC

Closed February 19, 2012 08:07AM UTC

Last modified October 22, 2012 11:34PM UTC

Invalid argument in IE7 and IE9 compatibility mode.

Reported by: anonymous Owned by: anonymous
Priority: low Milestone: 1.next
Component: effects Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

I have this code in my project:

div.animate(

{ maxHeight: newMaxHeight + "px" },

'fast',

function() {

btn.text(context.m_LocalizedLabels.ShowMoreDetails);

context.m_Enlarged = 0;

context.callResizeCallbackFunction();

}

)

where newMaxHeight is an int, context is an object and btn is an html button.

This code throws this exception:

SCRIPT87: Invalid argument.

line 18 character 20327

Attachments (0)
Change History (14)

Changed July 06, 2011 12:58PM UTC by dmethvin comment:1

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

Hi, can you provide a reduced test case using jsFiddle.net? We don't have enough information to determine if there is a bug.

Most likely the newMaxHeight value is non-numeric in the case where IE is throwing the error. Use a debugger (Firebug in Firefox, Ctrl-Shift-I in Chrome, F12 in IE) to stop execution at that point in your code and examine the arguments to animate().

Changed July 06, 2011 01:12PM UTC by amir@actionbase.com comment:2

As previous stated, this only occur in IE with 7 standards.

I've already debugged this segment, and I can definitely that newMaxHeight is numeric.

As for reduced test case, that would be difficult, but I would try.

Changed July 06, 2011 01:30PM UTC by amir@actionbase.com comment:3

I might be able to narrow it down:

The error is thrown from this line - a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit

that's what IE is referring to.

Checking it further, it seems that a.now is: "noneNAN". Other than that: a.prop is maxHeight and a.unit is "px".

Call stack is:

> _default

update

step

h

custom

Anonymous Function

dequeue

Anonymous Function

each

each

queue

animate

Changed July 21, 2011 07:54AM UTC by trac-o-bot comment:4

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 August 20, 2011 05:36PM UTC by bill robinson comment:5

I am having a similar "Invalid argument" issue with XP / IE8 Standards / jQuery 1.6.2 - there seems to be a race condition earlier in the call stack which results in variable fx.now at line 8538 intermittently taking values such as 'NormalNaN', '#444444NaN, etc., depending on which property is being animated.

Unfortunately I am not sufficiently familiar with the internals of jQuery to readily spot where this arises.

Changed August 24, 2011 12:30PM UTC by chonunca@gmail.com comment:6

same for me, on IE7 i got an "no valid argument" in line 8538 of jQuery 1.6.2

seem coming from this line :

fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;

Changed October 28, 2011 02:58PM UTC by anonymous comment:7

Bug is still reprodusible.

Changed February 01, 2012 08:54AM UTC by anonymous comment:8

i am still getting this bug in IE7 and IE8

i am using .css('min-height', VALUE) with a numeric value without 'px' for resizing the main-div on page-load

Changed February 01, 2012 01:50PM UTC by dmethvin comment:9

resolution: invalid
status: closedreopened

Please stop posting the "I am still getting this bug" comments and post a test case we can use to diagnose. I'll reopen the ticket in anticipation of a reply.

Changed February 01, 2012 01:50PM UTC by dmethvin comment:10

status: reopenedpending

Changed February 03, 2012 01:42AM UTC by Hernani comment:11

I see people asking if newMaxHeight on the op snippet is numeric. Even if its not, it doesn't really matter because it gets concatenated with "px", so it becomes a string.

Changed February 05, 2012 12:11AM UTC by astynax777 comment:12

I can confirm that I get this error only when I'm passing in 0 (zero) with a unit as an argument. For example:

// Fails
$("#foo").animate({ marginLeft : "0%" }, "fast");

// Works
$("#foo").animate({ marginLeft : "0" }, "fast");

Changed February 19, 2012 08:07AM UTC by trac-o-bot comment:13

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 October 22, 2012 11:34PM UTC by anonymous comment:14

Similar fix

Has error:

$(this).animate({top: '=0'}, 105);

Works:

$(this).animate({top: '0'}, 105);