0

I'm working with jQuery and the code loaded fine and when I changed around the CSS and now gives me an illegal operation handle for jQuery. and now won't load in Compatability mode.

SCRIPT1028: Expected identifier, string or number 
index.php, line 124 character 1

I received from script debugging. I didn't receive this is any other browser.

My jQuery is :

<script type="text/javascript" src="lib/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="lib/js/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider({
    effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
    animSpeed: 500, // Slide transition speed
    pauseTime: 5000, // How long each slide will show
    startSlide: 0, // Set starting Slide (0 index)
});
});
</script>

Can someone tell where I went wrong?

Kyle Monti
  • 704
  • 2
  • 10
  • 21

3 Answers3

2

Remove the trailing comma on this line:

startSlide: 0,

Should be:

startSlide: 0

Older versions of Internet Explorer don't support trailing commas in object notation.

leepowers
  • 37,828
  • 23
  • 98
  • 129
1

Remove the comma after the startSlide: 0

$(window).load(function() {
$('#slider').nivoSlider({
    effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
    animSpeed: 500, // Slide transition speed
    pauseTime: 5000, // How long each slide will show
    startSlide: 0 // Remove the comma here
});
});
William Calvin
  • 625
  • 6
  • 19
0

did you by any chance deleted the container from the page?

<div id="slider"></div>
Max Chern
  • 51
  • 1
  • 1