If Browser is Internet Explorer: run an alternative script instead

后端 未结 10 679
后悔当初
后悔当初 2020-11-29 05:11

I\'m using an image carousel script that is quite heavy on the browser. It works great in Opera and Chrome, half decent in FF and absolutely breaks my balls in IE. So i\'d l

10条回答
  •  眼角桃花
    2020-11-29 05:42

    For IE10+ standard conditions don't work cause of engine change or some another reasons, cause, you know, it's MSIE. But for IE10+ you need to run something like this in your scripts:

    if (navigator.userAgent.match(/Trident\/7\./)) {
      // do stuff for IE.
    }
    

提交回复
热议问题