Internet Explorer 8兼容jQuery

时间:2015-05-08 08:45:52

标签: javascript jquery internet-explorer-8

IE 8 Error

嗨,我只是想知道是否有人可以帮我这个,我一直在IE8中得到这个,我已经通过jQuery并检查了所有错误,我确实有一些太多了,选择后和一些在括号之后,但无论我尝试什么,我都无法识别下面的$ code ...

$(document).ready(function() {


    /* --------------------------------------------------------------------------- */
    /*  1.  Main Slider (Revolution Slider)
    /* --------------------------------------------------------------------------- */

    $('.revslider').revolution( {  <-- THIS IS LINE 31
        delay                 : 9000,
        startwidth            : 1120,
        startheight           : 535,

        onHoverStop           : "on",                   // Stop Banner Timet at Hover on Slide on/off

        thumbWidth            : 100,                    // Thumb With and Height and Amount (only if navigation Tyope set to thumb !)
        thumbHeight           : 50,
        thumbAmount           : 3,

        hideThumbs            : 200,
        navigationType        : "none",                 //bullet, thumb, none, both  (No Shadow in Fullwidth Version !)
        navigationArrows      : "verticalcentered",     //nexttobullets, verticalcentered, none
        navigationStyle       : "round",                //round,square,navbar

        touchenabled          : "on",                   // Enable Swipe Function : on/off

        navOffsetHorizontal   : 0,
        navOffsetVertical     : 20,

        stopAtSlide           : -1,                     // Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case.
        stopAfterLoops        : -1,                     // Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic

        fullWidth             : "on",

        shadow                : 0
    });

1 个答案:

答案 0 :(得分:1)

您可以使用jQuery代替$,导致

jQuery(document).ready(function() {
    jQuery('.revslider').revolution( {
        ...

另请注意,jQuery 2.x不支持IE8 - see here

您需要使用jQuery 1.x来支持IE6 +。

同时检查您是否正确包含脚本 - 请参阅此问题:How does $(document).ready() work in IE 8?