How do I get select2 to work in IE8?


I am having problems getting select2 to work in IE8.

I have multiple select drop downs and I am targeting them like:

    placeholder: "Please select",
    allowHtml: true,
    closeOnSelect: true

Do I need to do anything special to get the selects to work in IE8?


According to the home page, they support IE8:

Support for both modern and legacy browsers is built-in, even including Internet Explorer 8.

Can you be more specific about the problem you’re having? Are there any messages in the JavaScript console?


The error in the console is: undefined’ is null or not an object


I have been trying to get select2 to work in IE8 for a while and unfortunately it won’t work. There are a few errors in the console:

Expected identifier, string or number on a test local install

It isn’t working out of the box and I cannot understand why?!

On my working project I get a different error:

undefined’ is null or not an object

Can anyone help?


The console should show the file and line number where these errors occur. What are the lines of code where these errors happen?

Also, does your code work in other browsers? Other versions of IE? Chrome? Firefox?

Can you put your code on or so I can see what’s happening?