简体   繁体   English

jQuery滑块在IE中不起作用,在chrome,firefox中工作

[英]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.

相关问题 jQuery Coda Slider在Chrome中不起作用,在Firefox和IE中效果很好 - Jquery Coda Slider not working in Chrome, Works Pretty well in Firefox and IE jQuery无法在IE中使用,但可以在Chrome和Firefox中使用 - JQuery not working in IE, but works in Chrome and firefox jQuery $ .getJSON无法在Chrome和Firefox上运行,但可以在IE中运行 - Jquery $.getJSON is not working Chrome and Firefox but it works in IE jQuery在IE中不起作用,但在Chrome和FireFox中起作用 - jquery not working in IE but works in Chrome and FireFox jQuery的工作在Chrome和Firefox,而不是IE - jquery works in chrome and firefox, not IE jQuery适用于Chrome和firefox,但不适用于IE - jQuery works in Chrome and firefox, but not IE jQuery hasClass()在IE 11中不起作用,但在Chrome和Firefox中起作用 - jQuery hasClass() not working in IE 11 , but works in Chrome and Firefox jQuery在Firefox中无法正常工作,但在IE和Chrome中可以正常工作 - Jquery not working properly in Firefox but works fine in IE and Chrome Click / Toggle jQuery不适用于FireFox,但可在IE和Chrome中使用 - Click/Toggle jQuery not working with FireFox, but works in IE & Chrome jQuery事件委托开/关不能在IE或Firefox中工作,但在Chrome中工作 - jquery event delegation on/off not working in ie or firefox but works in chrome
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM