-3

I have a 2 small script in the footer of my page, that produce a script error in IE8. IEtester says that this script error is created from the document ready (but i believe it's just cuz it's the start). I used jQuery so that it was cross browser compatible. :(

<script type="text/javascript">
$(document).ready(function(){

    //flexslider
   $(".flexslider").flexslider({
   animation : "slide",
    slideshow : true,
   animationDuration: "750",
   slideshowSpeed: 5000,
   pauseOnAction: true, 

  }); 

  //text slider overer
    $("#videos li").on({

  mouseenter: function() {
     $(this).animate({"padding-left": "50px"}, "normal");
  },

  mouseleave: function() {
       $(this).stop(true).animate({"padding-left": "0px"}, "slow");

  }});
  });

enter image description here Does anyone know how to correct this script error? If so, could you explain why this error is created in the first place?

first script html page: http://designobvio.us/fonts/ Second script html page: http://designobvio.us/fonts/middle.php

Igor
  • 33,276
  • 14
  • 79
  • 112
Armeen Moon
  • 18,061
  • 35
  • 120
  • 233

2 Answers2

5

Here's one issue that's sure to trip up IE8:

$(".flexslider").flexslider({
   animation : "slide",
    slideshow : true,
   animationDuration: "750",
   slideshowSpeed: 5000,
   pauseOnAction: true, // <-- Trailing comma
});

IE8 and lower hate trailing commas.

cliffs of insanity
  • 3,683
  • 1
  • 16
  • 18
  • i'll update the code. I'm sure that trailing comma was no good either – Armeen Moon May 13 '12 at 21:38
  • I have same issue in IE8 for the code var control = $('',{classid: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",width: "100%",height: "100%",name: player.settings.name,codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab",html: html}); Coul't you suggest me? – sureshunivers Feb 18 '13 at 12:30
2

Remove the , from this line: pauseOnAction: true,

IE doesn't support commas on the end of the last line in an array or object.

Sam French
  • 705
  • 1
  • 5
  • 10