简体   繁体   中英

Jquery working in Firefox but not Internet Explorer

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!

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM