无效的参数IE 8 jQuery [英] Invalid Argument IE 8 jQuery

查看:166
本文介绍了无效的参数IE 8 jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个特殊的脚本运行,以便Flash元素不会出现在我的滑出式导航之上。这个用wmode重绘那个flash元素是不透明的,所以它在导航下显示出来。与Chrome和FireFox完美兼容,但与IE不兼容。在IE中,我得到一个无效的参数在jquery.min.js代码0行103字符460.谁能帮我至于为什么?如果我注释掉函数中的第二行代码,那么就没有错误,但在FireFox中不起作用。任何帮助appriciated。

  $(window).load(function(){
$('embed') .attr('wmode','opaque');
$('object')。append('< param name =wmodevalue =opaque>');
$( 'wrap'('< div>);
});


解决方案

我找到了解决方案。这就是我所做的。如果浏览器不支持htmlSerialize,那么使用altHtml在这里嵌入* / b


$ b $ $ $ $ $ support.htmlSerialize){/ *如果浏览器不支持htmlSerialize,
$(this).replaceWith($(this).attr('altHtml'));
});


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

解决方案

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

这篇关于无效的参数IE 8 jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆