JQuery works in Firefox but not Internet Explorer

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

It works as expected in Firefox and other browsers, but NOT in any version of IE that I tried - the browser displays all the divs, and does not cycle through them. I assume this is due to the fact that jQuery does not work / does not load at all due to a kind of syntax that IE does not like, version incompatibility, etc.

BUT I have no idea, because I am not aware of javascript work. Anyone who could point me in the direction of what to look for to fix this would be appreciated!

+4
source share
2 answers

You have an extra comma at the end of the plugin options list. This is not python; -)

Firefox really forgives about this, IE NOT. Remove this and it should get rid of the error that kills your js.

$("#slideshow").after('<div id="slideshownav">').cycle({ fx: 'fade', timeout: 9000, speed: 1250, pause: 1, pager: '#slideshownav' }); 
+13
source

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

See other tools and tips I wrote in this answer .

Hope these tips help.

+5
source

Source: https://habr.com/ru/post/1285709/


All Articles