簡體   English   中英

jReject在IE6和IE7上不起作用

[英]jReject not working on IE6 and IE7

我已經按照文檔配置了jReject,它在IE8,IE9,IE10 +等上都能正常工作。但是由於某種原因,它對IE6和IE7無效。

目前,我已將其配置為阻止所有瀏覽器,所以我不確定為什么嗎?

HTML

<head>

<script type="text/javascript">
 document.createElement('header');
 document.createElement('nav');
 document.createElement('menu');
 document.createElement('section');
 document.createElement('article');
 document.createElement('aside');
 document.createElement('footer');
</script>

    <meta charset="utf-8">

    <title>Indigo | Information and Communication Solutions</title>

    <link rel="stylesheet" href="../reset.css">
    <link rel="stylesheet" href="../style.css">
    <link rel="stylesheet" href="../animations.css">
    <link rel="stylesheet" type="text/css" href="../jquery.reject.css" />

    <script type="text/javascript" src="../jquery-1.6.1.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    <script type="text/javascript" src="custom.js"></script>
    <!-- jReject -->    
    <script type="text/javascript" src="../jquery.reject.js"></script>
    <script type="text/javascript"> 

    $(function() {
    $.reject({
         reject: {
             safari: true, // Apple Safari
             chrome: true, // Google Chrome
             firefox:false, firefox1: true, firefox2: true , // Mozilla Firefox
             msie: true, // Microsoft Internet Explorer
             opera: true, // Opera
             konqueror: true, // Konqueror (Linux)
             unknown: true // Everything else
         }
     }); //
});
</script>
</head>

jQuery的,reject.js

(function($) {
$.reject = function(options) {
    var opts = $.extend(true, {
        // Specifies which browsers/versions will be blocked
        reject : {
            all: true, // Covers Everything (Nothing blocked)
            msie: 6 // Covers MSIE <= 6 (Blocked by default)

任何幫助,不勝感激。

謝謝,

更新:

有趣的是,如果我從官方站點運行該演示程序,它甚至無法正常工作。 http://jreject.turnwheel.com/

...所以猜想問題不是我的代碼特有的。 我想知道這是否可能是browserstack問題?

第40行的jReject似乎有問題:

        chrome: {
            // Text below the icon
            text: 'Google Chrome',
            // URL For icon/text link
            url: 'http://www.google.com/chrome/', *** REMOVE THIS COMMA ***
            // (Optional) Use "allow" to customized when to show this option
            // Example: to show chrome only for IE users
            // allow: { all: false, msie: true }
        },

似乎還有一個逗號在舊版IE中引發JavaScript錯誤。

在此處查看有關此內容的更多討論:

Internet Explorer 9是否會在數組和對象文字的末尾加上多余的逗號?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM