Load different jquery script if browser is internet explorer?

后端 未结 5 1609
盖世英雄少女心
盖世英雄少女心 2020-12-20 06:04

I\'ve been having some major issues with a layout I\'m making specifically in Internet Explorer. I know IE converts width and heights differently when there is borders and p

5条回答
  •  温柔的废话
    2020-12-20 06:46

    I would use this approach because, in my opinion, it's cleaner and more accurate then loading two scripts and overwriting code, like in accepted answer.

    In this code iemenu.js will be loaded only if it is IE version less then IE9 and in other cases, like IE9-10-11 or any other browser, it will load menu.js

    
    
        
    
    

    Here is example and discussion about two different versions of jQuery: http://www.impressivewebs.com/loading-different-jquery-version-ie6-8/

    Maybe I'm late with answer :) ...

提交回复
热议问题