我正在开发一个项目,我需要在一个页面上显示几个拍卖的状态。每个项目都有不同的结束日期。我使用cfquery
从数据库中提取数据,然后使用cfoutput
构建表。那部分很好。那里没有问题。我的问题是,如何将Keith Wood's countdown timer的多个实例放在表格中,以便每个项目都有倒计时?html表中的多个jquery倒计时
这是我的表
<table id="large" class="tablesorter" border="0" CELLSPACING="1" CELLPADDING="0" width="50%">
<thead>
<tr class="tablesorter-headerRow">
<th id="itemnum" class="sorter-numeric">ItemNum</th>
<th id="highbidder" class="sorter-numeric">HighBidder</th>
<th id="closenum" class="sorter-numeric">Time Left</th>
<th id="highbidprice" class="sorter-numeric">HighBid</th>
</tr>
</thead>
<tbody>
<cfoutput>
<!--- Code builds the table body --->
<div class="countdown-styled clearfix" style="width:200px;"></div>
</cfoutput>
</tbody>
</table>
我已经看过这些头:1)Jquery multiple coundown 2)multiple countdowns on same page with jquery但这些要么似乎包括每个页面中的唯一行ID,然后在其他一些jQuery代码,或只是硬编码的ID。这个问题是我不知道最终版本上有多少物品。现在我有35但这不是恒定的,所以我不能这样做。任何想法或帮助吗?会真的很感激它。
表体输出是什么样的?它的结构将直接影响你用来触发倒计时的jQuery。 – miah 2013-04-11 20:21:12