我有一个隐藏下列jQuery脚本/扩展在表行:jQuery的隐藏表行
它是由这个例子启发:
http://www.jankoatwarpspeed.com/examples/expandable-rows/
<script type="text/javascript">
$(document).ready(function(){
$("#orders tr:odd").addClass("odd");
$("#orders tr:not(.odd)").hide();
$("#orders tr:first-child").show();
$("#orders tr.odd").click(function(){
$(this).next("tr").toggle();
$(this).find(".toggler").toggleClass("on");
$(this).find(".toggler").text("hide");
});
});
</script>
我的HTML如下:
<table class="blueWrapperTbl" id="orders">
<tbody>
<tr>
<td> <h:outputText value="#{order.orderId}" /> </td>
<td> <h:outputText value="#{order.orderId}" /> </td>
<td> <h:outputText value="#{order.orderId}" /> </td>
<td> <h:outputText value="#{order.orderId}" /> </td>
<td><a href="#" class="ubber"><b>Change Order</b></a></td>
<td><a href="#" class="toggler">Show</a></td>
</tr>
<tr>
...
</tr>
</table>
相关的CSS部分如下:
.blueWrapperTbl .toggler { background:url(../images/plus.gif) right center no-repeat; padding-right:20px; display:inline-block; text:'fff'}
.blueWrapperTbl .toggler.on { background:url(../images/minus.gif) right center no-repeat; }
我需要做到以下几点:
- 当我行花费我想改变从“显示”“隐藏”“toggler”文本。
- 当我的行被隐藏时,我不需要显示“更改订单”网址。它必须隐藏。
请帮帮我。
哪来的表的休息吗? “...”还有什么
2011-03-28 17:12:09