我正在使用这个在win / mac FF 3.5和Safari中运行良好的jquery函数,

但不是在IE 8中,文本在其中的每个条件都会发生变化,但隐藏的div,css设置为none,则不起作用。

//Expander Function
function expando(showText, hideText, content, selector) {
        var showText= showText;
        var hideText= hideText;
        $(selector).click(function() {
        $(this).html ($(this).html()== hideText ? showText : hideText);
                $(content).toggle();
                return false;});}
expando('… Read More',' Show Less','span.more-description','a.more-desc');
expando('Click Here To View','Hide Details','ul.more-options','span.solo a');

在IE 8中我收到此错误 网页错误详情

用户代理:Mozilla / 4.0(兼容; MSIE 8.0; Windows NT 6.1; Trident / 4.0; Mozilla / 4.0(兼容; MSIE 6.0; Windows NT 5.1; SV1); SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 3.0.30618; Media Center PC 5.0; SLCC1) 时间戳:星期一,2009年10月26日14:12:32 UTC

消息:参数无效。 行:12 查尔:12949 代码:0 URI: http://ajax.googleapis.com/ AJAX /库/ jquery的/ 1.3.2 / jquery.min.js

有帮助吗?

解决方案

JQuery目前在1.4.2;你可以试试1.4.2,看看问题是否仍然存在?

其他提示

您的Jquery版本存在问题。我也会尝试更新。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top