Invalid Argument IE 8 jQuery
I have this particular script that runs so that the flash elements don't show up on top of my slide out navigation. This redraws that flash eleme开发者_JAVA百科nt with wmode as opaque and so it shows up under the navigation. Works perfectly with Chrome and FireFox but not with IE. In IE I get an Invalid Argument in jquery.min.js code 0 Line 103 char 460. Can anyone help me as to why? If I comment out the second line of code inside the function then there is no error, but then doesn't work in FireFox. Any help is appriciated.
$(window).load(function(){
$('embed').attr('wmode','opaque');
$('object').append('<param name="wmode" value="opaque">');
$('object').wrap('<div>');
});
I found a solution to this. This is what I did.
if ( !$.support.htmlSerialize ) { /*If browser doesn't support htmlSerialize then use altHtml embed here */
$(this).replaceWith($(this).attr('altHtml'));
});
精彩评论