Re: [問題] jQuery的bug?

看板Web_Design作者 (沉默是金)時間18年前 (2008/08/10 17:07), 編輯推噓1(104)
留言5則, 1人參與, 最新討論串2/3 (看更多)
※ 引述《legnaleurc (CA)》之銘言: : 環境: : Konqueror 4.1.0 : jQuery 1.2.6 : 寫法1: : var temp = $( '#domElement__1__' ).hide(); : alert( temp.css( 'display' ) ); // none : $( '#domElement__2__' ).after( temp ); : alert( temp.css( 'display' ) ); // block or inline (default) : 寫法2: : var temp = $( '#domElement__1__' ).css( 'display', 'none' ); : alert( temp.css( 'display' ) ); // none : $( '#domElement__2__' ).after( temp ); : alert( temp.css( 'display' ) ); // none : =========== : 難道hide其實和display: none不一樣? : 其他瀏覽器都不會這樣說 : 有人可以幫測嗎?>< hide: function(speed,callback){ return speed ? this.animate( { height: "hide", width: "hide", opacity: "hide" }, speed, callback ) : this.filter(":visible").each( function(){ this.oldblock = this.oldblock || jQuery.css(this,"display"); this.style.display = "none"; }).end(); } 你沒有給他speed , 所以看filter那斷就好 , 看看你要不要測測看 temp.filter(":visible")是不是正確work? Konqueror 是真的沒試過...@@ -- What do you want to have ? / What do you have? 從書本中,你可以發現我的各種興趣。 從CD中,你可以瞭解我所喜歡的偶像明星。 或許從文字你很難以瞭解一個人,但從物品可以。 My PPolis , My past. http://ppolis.tw/user/Tony -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.132.59.247

08/10 17:26, , 1F
temp.filter(":visible")是正確的
08/10 17:26, 1F

08/10 17:26, , 2F
平常hide是會work的,只是如果insert之後
08/10 17:26, 2F

08/10 17:27, , 3F
hide的效果會消失,但是css設的display不會
08/10 17:27, 3F

08/10 17:27, , 4F
在想這是Konqeuror的特殊行為還是jQuery的問題
08/10 17:27, 4F

08/10 17:28, , 5F
有空切到Windows上再測Safari好了
08/10 17:28, 5F
文章代碼(AID): #18dg_GqS (Web_Design)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):
文章代碼(AID): #18dg_GqS (Web_Design)