简体   繁体   中英

Function Expected In IE7 & IE8

I am no Javascripter, but I have two Javascripts on my HTML page that are obviously conflicting, I have had a good read through the forum and a good look through google, but can't make out any sufficient solutions, so I am hoping someone here may be able to help me out with their greater experience. I am getting "Function Expected" in IE7 and IE8, later versions of IE are fine, Firefox, Safari, Chrome and Opera are fine too.

First script:

$(window).load(function(){
  $('.flexslider').flexslider({
    animation: "fade",
    start: function(slider){
      $('body').removeClass('loading');
    }
  });
});

Second script:

$(document).ready(function() {

var quotes = $(".quotes");
var quoteIndex = -1;

function showNextQuote() {
++quoteIndex;
quotes.eq(quoteIndex % quotes.length)
    .fadeIn(2000)
    .delay(2000)
    .fadeOut(2000, showNextQuote);
}

showNextQuote();

})();

I would be extremely grateful for any pointers that you can give me on this.

您可能正在使用不支持IE 6,7或8的jquery版本2.x。请使用版本1.x而不是2.x。

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