views:

2385

answers:

3

I'm using the jQuery Cycle plugin (malsup.com/jquery/cycle/) on this page: http://artandculturecenter.org

It works as expected in Firefox and other browsers, but NOT in any version of IE that I've tried -- browser displays all the divs rather then cycling through them. I'm assuming this is because jQuery isn't working/loading at all because of some sort of syntax thing that IE doesn't like, version incompatibility, etc.

BUT I have no idea because I'm sort of ignorant of the workings of javascript. Anyone who could point me in the directions of what to look for to fix this would be appreciated!

+10  A: 

You've got an extra comma at the end of your list of options for the plugin. This isn't python ;-)

Firefox is very forgiving about that sort of thing, IE is NOT. Remove that and it should get rid of the error that's killing your js.

$("#slideshow").after('<div id="slideshownav">').cycle({ 
        fx: 'fade', 
        timeout: 9000, 
        speed: 1250, 
        pause:  1,
        pager: '#slideshownav'
    });
Gabriel Hurley
Wow, thanks!(I WISH my pov was python.., actually more like CSS!)
alesh
+3  A: 

A tool that helps me a lot is JSLint. Helps you find missing commas, etc. Give it a try.

See some other tools and tips that I wrote in this answer.

Hope these tips could help.

Castanho
jslint can definitely be useful.
Gabriel Hurley
Kind of not related to the question, but if someone are using JSON could use the: jsonlint.com too
Castanho
A: 

Doh! had the same commma problem - thankyou, thankyou, thankyou :)

Shaz