Invalid Argument IE 8 jQuery

荒凉一梦 提交于 2019-12-24 08:09:37

问题


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

回答1:


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


来源:https://stackoverflow.com/questions/2657697/invalid-argument-ie-8-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!