jQuery not working with IE 11

Object doesn't support property or method 'addEventListener'

'jQuery' is undefined 

I'm using IE 11,

/jquery-2.1.1.min.js

jquery-migrate-1.1.1.js

and jquery-ui-1.11.0.custom/jquery-ui.js (theme roller)

Before 2.1.1, i was using 1.11.1 with chrome (worked fine)

I have tried this fix but it did not work for me


Solution 1:

As Arnaud suggested in a comment to the original post, you should put this in your html header:

<meta http-equiv="X-UA-Compatible" content="IE=edge">

I don't want any cred for this. I just want to make it more visible for anyone else that come here.

Solution 2:

The problem was caused because the page was an intranet site, & IE had compatibility mode set to default for this. IE11 does support addEventListener()

Solution 3:

For me the issue turned out to be I was using es6's right arrow functions => as opposed to function ().

Replacing => with function () resolved for me.

I had assumed it was a jQuery issue.

Solution 4:

Thanks @Arnaud & @Conny for highlighting this answer. This really helped me. I would like to add one more thing here is, adding this line <meta http-equiv="x-ua-compatible" content="IE=edge"> just after the title in tag prior to all meta tags is must for to work as it overrides the compatibility mode of IE.