我使用這個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