Jquery working in Firefox but not Internet Explorer

17,077

Solution 1

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'
    });

Solution 2

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.

Share:
17,077
Admin
Author by

Admin

Updated on June 09, 2022

Comments

  • Admin
    Admin almost 2 years

    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!

  • Admin
    Admin almost 15 years
    Wow, thanks! (I WISH my pov was python.., actually more like CSS!)
  • Gabriel Hurley
    Gabriel Hurley over 14 years
    jslint can definitely be useful.
  • rafa.ferreira
    rafa.ferreira over 14 years
    Kind of not related to the question, but if someone are using JSON could use the: jsonlint.com too