2011-04-04 55 views

回答

3

與其他任何jQuery函數一樣。只需使用jQuery選擇器:

$('#tr1, #tr2').expose(); 
+0

geez(它在IE7中失敗了嗎? – 2011-04-12 08:55:55

+0

@pukipuki,看起來像一個暴露的bug – 2011-04-12 09:05:23

1

如果您的意思是使可見,那麼肯定。

CSS

tr { display: none; } 

HTML

<span class="exposeNow">EXPOSE</span> 

<table> 
    <tr class="exposeMe"> 
     <td>Some stuff</td> 
     <td>in here too</td> 
    </tr> 
    <tr class="exposeMe"> 
     <td>Some stuff</td> 
     <td>in here too</td> 
    </tr> 
    <tr> 
     <td>This one won't</td> 
     <td>get shown on click</td> 
    </tr> 
    <tr> 
     <td>This one won't</td> 
     <td>get shown on click</td> 
    </tr> 
</table> 

jQuery的

$("span.exposeNow").click(function(){ 
    $("tr.exposeMe").show(); 
}); 
+2

我認爲他的意思是揭露():http://flowplayer.org/tools/toolbox/expose.html – 2011-04-04 12:04:30

+0

仍然相關,只是用.expose()替換.show() - 謝謝!:-) – Mitch 2011-04-04 12:09:07

+0

Mitch)你有沒有使用類屬性的任何解決方案,仍與ie隔? – 2011-04-12 08:59:22

0

如果這是關於http://flowplayer.org/tools/demos/toolbox/expose/index.html

恐怕你可能無法在2 tr的同時做到這一點。

+0

幸運的是它的作品) – 2011-04-04 13:00:35

+0

...不幸的是 - 不在IE瀏覽器(((( – 2011-04-12 08:59:58

+0

)你試過改變你的表格佈局模式來讓它工作嗎? 嘗試table-layout:fixed – 2011-04-12 09:15:40

相關問題