views:

114

answers:

2

Wondering what to do about this. Googling but can't seem to find anything. I am using the Cycle Plugin for JQuery and works great in all browsers but IE of course. Same problem in IE 6, 7, and 8.

Expected identifier, string or number referring to line 13 of my js file. Anyone know what to do here?

js file:

$(document).ready(function() {
    $('.slideshow').cycle({
  speed:  200,
  timeout: 15000, 
  pager:  '#tabs',
  pagerEvent: 'mouseover',
  pauseOnPagerHover: true,
  pagerAnchorBuilder: function(i, slide){// callback fn for building anchor links:  function(index, DOMelement) 
    return '<a href="path-to-link"><img src="../images/tabback.png' + slide.src + '" height="47" width="189" /></a>';
},


 }); <------THIS IS LINE 13
});
+3  A: 

Remove the , after your pagerAnchorBuilder callback.

prodigitalson
Thank you very much. I am an idiot.
bgadoci
+4  A: 

Oh Oh, I know this one. There is an extra , at the end of line 12 which IE doesn't like. I have had this bite me multiple times.

It is always a good idea to put your javascript through jslint.

abhaga
Thanks man. I will def use jslint going forward. I love IEEEEEEEE.
bgadoci
jslint is a handy tool. IE loves to destroy your app with the extra comma!
David Caunt
Aye that it does. I too have suffered this humiliation many a time. sometimes sinking in hours of debug time before the "duh moment".
prodigitalson