media icon indicating copy to clipboard operation
media copied to clipboard

Problem with IE9 - fails on createElement

Open bernd123 opened this issue 13 years ago • 1 comments

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

bernd123 avatar Mar 16 '11 12:03 bernd123

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!

tuonela avatar Feb 23 '12 13:02 tuonela