【发布时间】:2010-03-26 21:26:32
【问题描述】:
我正在使用这个在 win/mac FF 3.5 和 Safari 中运行良好的 jquery 函数,
但不是在 IE 8 中,文本在其中的每个条件下都会发生变化,但是隐藏的 div,css 设置为不显示不起作用。
//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;媒体中心 PC 6.0;.NET CLR 3.0.30618;媒体中心 PC 5.0;SLCC1) 时间戳:2009 年 10 月 26 日星期一 14:12:32 UTC
消息:参数无效。 线路:12 字符:12949 代码:0 网址:http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
【问题讨论】:
-
您找到解决此问题的方法了吗?我使用了您的代码,无法复制错误。我正在使用 IE 8.0.7600.16385
标签: jquery internet-explorer-8