Load different jquery script if browser is internet explorer?

后端 未结 5 1607
盖世英雄少女心
盖世英雄少女心 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:58

    Your need $.browser

    if ($.browser.msie) {
        alert("this is ie!");
     }
    

    For script loading you can use $.getScript

    $.getScript('ajax/test.js', function() {
      alert('Load was performed.');
    });
    

    So the final example

    
    

提交回复
热议问题