我在 IE8 中遇到问题:
function costructor(sectionId){
$('#nextG').ready(function(){
var counterBis = 0;
slider = '.slider0'+sectionId;
//sliderBox = $(slider).closest('.floatContent');
unitScrollBis = $(slider).find('.floatImg').eq(0).width();
maxImg = $(slider).find('.floatImg').length-2;
/*problem*/
prev = "#" + $("#controller0" + sectionId).find(".controller").eq(0).attr("id");
next = "#" + $("#controller0" + sectionId).find(".controller").eq(0).attr("id");
/*END*/
console.log(prev);
console.log(next);
makeMove(counterBis,unitScrollBis,prev,next,slider,maxImg);
function makeMove(counterBis,unitScrollBis,prev,next,slider,maxImg){
if(counterBis <= 0){
$(prev).fadeOut("fast");
}
else if(counterBis >= maxImg){
$(next).fadeOut("fast");
}
$(next).click(function(){
if(counterBis <= maxImg){
counterBis++;
$(prev).fadeIn("fast");
slide(counterBis);
}
else{
$(next).fadeOut("fast");
}
});
$(prev).click(function(){
if(counterBis > 0){
counterBis--;
$(next).fadeIn("fast");
slide(counterBis);
}
else{
$(prev).fadeOut("fast");
}
});
function slide(counterBis){
$(slider).animate({
marginLeft: '-' + (unitScrollBis*counterBis) + 'px'
},1000);
};
};
IE8 说:SCRIPT438: Object doesn't support property or method
谁能帮助我?问题只在 IE8 中,我不明白为什么 IE 不能构建这个字符串。谢谢您的帮助