jQuery滑块在Internet Explorer中不工作

jQuery滑块在Internet Explorer中不工作,jquery,internet-explorer,slider,explorer,rotator,Jquery,Internet Explorer,Slider,Explorer,Rotator,有人知道为什么这个滑块在IE7-9中不起作用吗?它是否与幻灯片的多个类有关?我已经研究了所有的漏洞,但我找不到答案 任何帮助都将不胜感激。谢谢 jQuery 1.9.1代码: $('#menu ul li.menuItem:first').addClass('act').siblings().addClass('inact'); /* On page load, mark the first thumbnail as active */ var totWidth=0; var position

有人知道为什么这个滑块在IE7-9中不起作用吗?它是否与幻灯片的多个类有关?我已经研究了所有的漏洞,但我找不到答案

任何帮助都将不胜感激。谢谢

jQuery 1.9.1代码:

$('#menu ul li.menuItem:first').addClass('act').siblings().addClass('inact');
/* On page load, mark the first thumbnail as active */

var totWidth=0;
var positions = new Array();

$('#slides .slide').each(function(i){
    // Loop through all the slides and store their accumulative widths in totWidth
    positions[i]= totWidth;
    totWidth += $(this).width();
    // The positions array contains each slide's cumulutative offset from the left part of the container

    if(!$(this).width())
    {
        console.log("Please, fill in width & height for all your images!");
        return false;
    }
});

$('#slides').width(totWidth);
// Change the container div's width to the exact width of all the slides combined


//get active thumb
var activeThumb = $('#menu ul li.act');
var nextThumb = activeThumb.next('li.inact');
var firstThumb = $('#menu ul li:first');

var addAct = function(slid){
    slid.removeClass('inact').addClass('act');
};
var removeAct = function(slid){
    slid.removeClass('act').addClass('inact');
    console.log('worked');
};

function nextSlide(){
    //get current thumb
    var activeThumb = $('#menu ul li.act');
    //get next thumb
    var nextThumb = activeThumb.next();
    //first
    var firstThumb = $('#menu ul li:first');

    if(nextThumb.length == 0){
        nextThumb = false;
        removeAct(activeThumb);
        addAct(firstThumb);
        firstThumb = activeThumb;
        //move Main image to first
        $('#slides').stop(false, true).animate({marginLeft: 0 + 'px'}, 350);
    } else {
        removeAct(activeThumb);
        addAct(nextThumb);
        //move Main image
        $('#slides').stop(false, true).animate({marginLeft: '-=200' +'px'}, 350);
    }
};

/*Execute Next Slide to next button*/
$('#nav li#next a').click(nextSlide);

fiddle在IE9中对我来说似乎工作得很好?我读到一个错误,IE的console.log你必须先按F12打开开发者工具,然后它将允许console.log输出,直到它爆炸出来。这可能是你的问题吗?哇,就是这样!我从未想到控制台对象会是问题所在。谢谢你,@Bearcat9245!(这是最新的小提琴:)