html中的脚本顺序适用于每个浏览器,但不适用于Internet Explorer 11

时间:2018-02-23 12:45:35

标签: javascript jquery internet-explorer

我使用这些脚本源,它的末尾。此订单适用于每个浏览器,但不适用于资源管理器,这是一个问题,因为我使用javascript拒绝资源管理器9中的弹出窗口,依此类推。我注意到当我在头部打开一个脚本标签时,javascript里面有jquery库,上面那个脚本标签可以工作,但我不想在html中放一个脚本我只是想让那个资源管理器从script.js加载它。有人知道订单或修复此问题吗?

非常感谢帮助。

<script type="text/javascript" src="script/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="script/jquery-ui.min.js"></script>
<script type="text/javascript" src="script/jquery.reject.js"></script>
<script type="text/javascript" src="script/jquery.hoverdir.js"></script>    
<script type="text/javascript" src="script/modernizr.custom.97074.js"></script>
<script type="text/javascript" src="script/jquery.cookie.js"></script>
<script type="text/javascript" src="script/script.js" ></script>

这样的代码不起作用:

            var div = document.createElement("div");
div.innerHTML = "<!--[if lt IE 10]><i></i><![endif]-->";
var isIeLessThan10 = (div.getElementsByTagName("i").length === 1);
if (isIeLessThan10) {


(function () {

    "use strict";

    $("#blokken, #header, .footer, footer")
             .animate({ opacity: 0 }, 500); // Then, make it semi-transparent

}());
        $('body').css('overflow','hidden');
            $(function() {
        // Handle external links

"use strict";
        // Handle displaying of option links
        $('em.option').css({
            cursor: 'pointer',
            fontSize: '1.1em',
            color: '#333',
            letterSpacing: '1px',
            borderBottom: '1px dashed #BBB'
        }).click(function() {
            var self = $(this);
            var opt = $.trim(self.text());

            $('ol.dp-c:first').children('li').children('span').each(function() {
                var self = $(this);
                var text = self.text();
                var srch = opt+':';

                // If found, highlight and jump window to position on page
                if (text.search(srch) !== -1) {
                    self.css('color','red');
                    window.location.hash = '#c-'+opt;
                    window.scrollTo(0,self[0].offsetTop);
                }
            });
        });



        $.reject({  
        reject: { all: true }, // Reject all renderers for demo  
        close: true, // Prevent closing of window  
        paragraph1: '', // Warning about closing  
        paragraph2: ''  
    });  

    return false;  

                });
    }


$(document).ready(function(){
    "use strict";
    $('#menu ul li #page2').on('click', function(){
          $('html,body').animate({scrollTop: $("#services").offset().top  * 0.86}, 1200);

    }); 

});     

$(function() {
    "use strict";
    var header = $("#header");

    $(window).scroll(function() {    
        var scroll = $(window).scrollTop();
        if (scroll >= 50) {
            header.addClass("scrolled");
            $("#headertitle").css('visibility', 'visible');
                $("#headertitle").css('opacity', '1');

(例如,不需要关闭标签)

等。

发现这是为了探索者阻止我的脚本,如何改变它将会起作用

/* Tekst scroll headertitel */

let updateHeader = () => {
    let scrollTop = $(window).scrollTop(),
    triggerTitle = "Portfolio";
  $('.trigger').each((i, el) => {
    let topPos = $(el).offset().top,
        distance = topPos - scrollTop;
    if (distance < 140)
        triggerTitle = $(el).data('title');
  });
  $('#headertitle').text(triggerTitle);
};

$(window).scroll(updateHeader);
$(window).on('touchmove', updateHeader);

0 个答案:

没有答案