我使用这个jQuery函数工作在WIN/MAC FF 3.5和Safari罚款,IE8和jQuery 1.3.2切换
但不是在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;三叉戟/ 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) 时间戳:Mon,26 Oct 2009 14:12:32 UTC
消息:无效的参数。 行:12 字符:12949 代码:0 URI:http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
您是否找到解决此问题的解决方案?我用你的代码,并不能重复错误。我正在使用IE 8.0.7600.16385 – 2010-01-14 18:08:43