简体   繁体   中英

Force IE10 to ignore javascript

My site was working fine a month or so ago, and then Microsoft it all it's glory forced my IE to update and now my conditional comments are being ignored by ie10.

Previously i had this:

<!--[if !IE]><!--><script type="text/javascript" src="slideshow.js"></script><!--<![endif]-->

Which was working fine, does anyone know of a way to force IE10 to ignore the above script?

As requested here is the full script i need to stop IE from loading, otherwise if someone knows how to get this working in IE and webkit browsers i would love to see it.

var Each = function(array, callback){
  for(var i = 0; i < array.length; ++i){
    callback.apply(array, [array[i], i, array]);
  }
};
var hideAll = function(elements) {
    Each(elements, function(img){
        img.className = 'hide';
    });
};
var flipImages = document.querySelectorAll('.images-flip img');
hideAll(flipImages);
var Counter = function(init, cb, t){ 
    this.start = function(){  
        init.call(this);
        this.loop();
    };
    this.callback = cb;
    this.loop = function(){
        clearTimeout(this.timeout);
        this.timeout = setTimeout(this.loop.bind(this), t);
        this.callback.call(this);
    };
    this.stop = function(){
        clearTimeout(this.timeout);
    };
    return this;
};
var flipArray = document.querySelectorAll('.images-flip');
Each(flipArray, function(flip){
    flip.counter = new Counter(function(){
        this.count = 0;
      },
      /*loop*/ function(){
        hideAll(flip.children);
        flip.children[this.count].className = '';
        this.count = (this.count+1) % flip.children.length;        
      }, 
    flip.dataset.time);
    flip.counter.start();
});

http://msdn.microsoft.com/en-us/library/ie/hh801214(v=vs.85).aspx

Checkout this link once. Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM