How do I detect IE 8 with jQuery?

前端 未结 12 1402
一生所求
一生所求 2020-11-30 19:14

I need to detect not only the browser type but version as well using jQuery. Mostly I need to find out if it is IE 8 or not.

I am not sure if I am doing it correctly

12条回答
  •  Happy的楠姐
    2020-11-30 19:42

    Here is the Jquery browser detect plugin to identify browser/os detection.

    You can use this for styling purpose after including the plugin.

    $("html").addClass($.os.name);
    $("body").addClass($.browser.className);
    $("body").addClass($.browser.name);
    

提交回复
热议问题