开发者

jQuery slide problem in IE

Can't get my mSlider function to work in IE. It's says i get an error on line 171. But i don't reckon why. Would appreciate some help please. Here's the page

This is what line 171 refers to:

window.mSlide = function(){
var currentPosition = 0;
var slideWidth = 500;
var slideTotal = 3; // Total amount slides
var mSlideObj = $(".mSlideObj");    

if(currentPosition == 0){
    $("#mSlideControlLeft").hide(); 
}

$("#mSlideContainer").css({marginLeft: 0});
$("#mSlideContainer").css('width', slideWidth * mSlideObj);
$("#mSlideControl span").css({"opacity": "0.85"}); 

$("#mSl开发者_如何学运维ideControl span").click(function(){
    currentPosition = ($(this).attr("id")=="mSlideControlRight") ?  currentPosition+1 : currentPosition-1;
    $("#mSlideContainer").animate({"marginLeft" : slideWidth*(-currentPosition)});
    if(currentPosition >= slideTotal){
        $("#mSlideControlRight").fadeOut(80);  
    } else
    {
        $("#mSlideControlRight").fadeIn();  
    }

    if(currentPosition <= 0){
        $("#mSlideControlLeft").fadeOut(80); 
    } else{
        $("#mSlideControlLeft").fadeIn();
    }
    $("p#text").text(currentPosition);

});

};


There was another error produced on that page. One that involves the minimized JQuery library you're referring to. You might want to try another version of JQuery.

EDIT: On Line 124, the line above where you declared the function in your post, I believe you forgot the ";" at the end of the defined function.

    })
}
window.mSlide = function(){
    var currentPosition = 0; 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜