[英]jquery slider not working in IE , works in chrome, firefox
i got a problem with a slider, its not working in internet explorer, i tested in IE 7 and 8 and i cant see it, please help this is my code 我有一个滑块问题,它在Internet Explorer中不起作用,我在IE 7和8中进行了测试,但我看不到它,请帮忙这是我的代码
<script type="text/javascript">
$(document).ready(function() {
var currentPosition = 0;
var slideWidth = 200;
var slides = $('.slider_move2');
var numberOfSlides = slides.length;
var slideShowInterval;
var speed = 3000;
slideShowInterval = setInterval(changePosition, speed);
slides.wrapAll('<div id="slidesHolder2"></div>')
slides.css({ 'float' : 'left' });
$('#slidesHolder2').css('width', slideWidth * numberOfSlides);
function changePosition() {
if (currentPosition > 0) {
$('#slidesHolder2').css('marginLeft',0)
.children().first().appendTo('#slidesHolder2');
} else {
currentPosition += 1;
}
moveSlide();
}
function moveSlide() {
$('#slidesHolder2').animate({
'marginLeft': slideWidth * (-currentPosition)
});
}
});
</script>
This is the error I found in IE7: 这是我在IE7中发现的错误:
imgWrap.animate({
top: '0px',
left: '135px',
width: '700px',
height: '400px', //<--- Remove the comma
}, sotiData.speedImg, function(){
imgWrap.attr('onclick', "sotBigImageHide('" + topW2 + "', '" + leftW2 + "')");
});
Please let me know if it solved your problem. 请让我知道它是否解决了您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.