Identify IE9/IE10 using jQuery

后端 未结 5 1924
庸人自扰
庸人自扰 2020-12-18 09:22

I have a jQuery code which is working fine for Chrome/Mozilla but not IE.

if ($(\"html\").hasClass(\"ie\")) {
    $(function(){
        $(\'.green-column, .         


        
5条回答
  •  我在风中等你
    2020-12-18 10:02

    Can be achieved without using libraries or conditional compilation:

    if (document.addEventListener) {
        alert("IE9 or greater");
    }
    
    if (window.requestAnimationFrame) {
        alert("IE10 or greater");
    }
    

提交回复
热议问题