Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with IE9 - fails on createElement #7

Open
bernd123 opened this issue Mar 16, 2011 · 1 comment
Open

Problem with IE9 - fails on createElement #7

bernd123 opened this issue Mar 16, 2011 · 1 comment

Comments

@bernd123
Copy link

Hi,

jquery.media does not work with Internet Explorer 9

error: SCRIPT5022: DOM Exception: INVALID_CHARACTER_ERR (5)
on line 414:
var o = document.createElement(a.join(''));

IE9 handles createElement different than IE8 does does

any ideas?

Best reagrds

Bernd

@tuonela
Copy link

tuonela commented Feb 23, 2012

I had the same problem. Here is what I did:

I am using jQuery Media Plugin version 0.97. I copied the js file to a local file on my server. In my local file I made the following changes:

replace:
var o = document.createElement(a.join(''));

with:
//IE9
if($.browser.version =='9.0'){
var o = document.createElement("div");
o.innerHTML = a.join('');
$.fn.media.defaults.autoplay = 0;
}
//IE8
if($.browser.version =='8.0'){
var o = document.createElement(a.join(''));
$.fn.media.defaults.autoplay = 1;
}

Hope that helps someone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants