开发者

Invalid Argument IE 8 jQuery

开发者 https://www.devze.com 2022-12-27 00:27 出处:网络
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

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'));
});
0

精彩评论

暂无评论...
验证码 换一张
取 消