views:

139

answers:

1

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

$("#mSlideControl 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);

});

};

A: 

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; 
MagikWorx
Tried to apply the ";" and changed to an older jquery version. But still gives the same error. Thx for trying at least MagikWorx!
Mattias Alfborger