Jump to content
Search Community

"Invalid Argument" Error in IE8 with CSSPlugin.min.js - Line 14, Character 10552

shayak test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm getting the "Invalid Argument, Line 14, Character 10552" error from CSSPlugin.min.js on IE8 (Standards mode).

 

Here's the bare essentials of the code that makes the TweenLite / CSSPlugin call to animate the "top" property:

 

var sl = document.getElementById('theSlidesContnr');
var ypos = [];
var slideHeight = $('.slide:first').outerHeight();
var totalSlides = $('#theSlidesContnr div.slide').length;
var automove = true;
var snum;
var run;
var speed = 3000;

function moveSlide()
{	
  var d;
 if(automove)
 {
   if(snum === undefined) snum = 1;

d = snum;
	  if( snum < totalSlides ) {
	snum++;
   } else if( snum >= totalSlides ) {
	snum = 1;		
   }
 }
 TweenLite.to(sl, 1, { css:{ top:ypos[d] }, ease:Power4.easeOut });
 //TweenLite.to(sl, 1, { css:{ top:parseInt(ypos[d]) }, ease:Power4.easeOut });
}


function autoRotate()
{
 run = window.setInterval( moveSlide, speed);  
}


function init()
{

 for( var i=0; i < totalSlides; i++)
	  ypos[i] = -(slideHeight * i);

 autoRotate();

}

init();

 

Tried both "//{ css:{ top:ypos[d] }" and "{ css:{ top:parseInt(ypos[d]) }" but got the same error. The same code works fine in the standards browsers & IE7.

 

I made sure to grab the latest greensock JS download. This is similar to another CSSPlugin error in IE8 but for a different line/character location in the code.

Link to comment
Share on other sites

Have you tried doing console.log(ypos[d]) right before the tween to see what you're feeding it? It sounds like maybe ypos[d] is sometimes evaluating as undefined or something. If you're still having trouble, would you please post a simple HTML page with only the essential code to reproduce the error so that we can test it in context?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...