Jssor Slider在IE7 GetComputedStyle中不起作用

时间:2015-01-23 13:13:16

标签: internet-explorer-7 jssor

我在IE 7中遇到了Jssor Slider的问题,控制台显示以下错误:

Jssor.Slider.min.js, Line 2 character 8364.

Property GetComputedStyle is null or not define

JS代码:

 if (data.url == 'pdf' || data.url == 'articulo'){
                        var isiPad = navigator.userAgent.match(/iPad/i) != null;
                        var drag = 0;
                        if (isiPad == true || document.getElementById('index-movil')){
                            drag = 1;
                        }
                            var options = {
                                $DragOrientation: drag,                                //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
                                $Loop: false,
                                $ArrowNavigatorOptions: {                       //[Optional] Options to specify and enable arrow navigator or not
                                    $Class: $JssorArrowNavigator$,              //[Requried] Class to create arrow navigator instance
                                    $ChanceToShow: 2,                               //[Required] 0 Never, 1 Mouse Over, 2 Always
                                    $AutoCenter: 0,                                 //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
                                    $Steps: 1                                       //[Optional] Steps to go for each navigation request, default value is 1
                                }
                            };



                        var jssor_slider1 = new $JssorSlider$("slider1_container", options);}

Chrome,Firefox和Safari完美运行

...谢谢

2 个答案:

答案 0 :(得分:0)

我测试了你的代码,它运行正常。也许您没有使用最新版本。

顺便说一下,你可以将$ Loop设置为0而不是false。

$ Loop:启用轮播的循环(循环),0:停止,1:循环,2回退,默认值为1

参考:http://www.jssor.com/development/reference-options.html

答案 1 :(得分:0)

我已经解决了我的问题,在jssor.slider.min.js中(仅适用于较少的IE9)我已将GetComputedStyle更改为currentStyle。

相关问题