【发布时间】:2011-08-15 11:53:29
【问题描述】:
我已经在“helpfulreviews”类的表格中动态创建了评论。我想获取这些表格并基本上隐藏除一个之外的所有表格,并在一段时间后使用 jQuery 自动滑入下一个表格
这里有三条评论,我希望一个显示并在大约 10 秒后滑入另一条评论,然后滑入第三条评论,然后旋转回到开头。我已经简化了示例:
<table width="100%" border="1" cellspacing="0" cellpadding="0" class="helpfulreviews">
<tbody>
<tr>
<td>MY FIRST REVIEW GOES HERE<br>Terrible Product</td>
</tr>
</tbody>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="0" class="helpfulreviews">
<tbody>
<tr>
<td>MY SECOND REVIEW GOES HERE<br>Great Product you have here</td>
</tr>
</tbody>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="0" class="helpfulreviews">
<tbody>
<tr>
<td>MY THIRD REVIEW GOES HERE<br>This is an awesome product</td>
</tr>
</tbody>
</table>
其中一张表的完整代码:
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="helpfulreviews">
<tbody><tr>
<td width="1%"> </td>
<td width="99%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="colors_descriptionbox">
<tbody><tr>
<td width="1px" valign="top"><img src="/v/vspfiles/templates/90/images/RBox_Border_Left_Top.gif"></td>
<td width="100%" valign="top" background="/v/vspfiles/templates/90/images/DBox_Border_Top.gif"><img src="/v/vspfiles/templates/90/images/clear1x1.gif" width="1" height="1"></td>
<td width="1px" valign="top"><img src="/v/vspfiles/templates/90/images/DBox_Border_Right_Top.gif"></td>
</tr>
<tr>
<td width="1px" background="/v/vspfiles/templates/90/images/DBox_Border_Left.gif"><img src="/v/vspfiles/templates/90/images/clear1x1.gif" width="1" height="1"></td>
<td width="100%" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td><b><img src="/v/vspfiles/templates/90/images/star5.gif"><br>
Great Product</b> </td>
<td align="right"><i>April 28, 2011</i></td>
</tr>
<tr>
<td><i><span class="PageText_L510n">Reviewer</span>:
<span class="PageText_L512n">Anonymous Person</span>
</i><br><br></td>
<td align="right"> </td>
</tr>
</tbody></table>
I used this product and it was great<br>
<br>
<span class="PageText_L514n"><span id="helpful"></span></span> <a href="/reviewhelpful.asp?ProductCode=TRU%2DGDM49&ID=12&yes=yes"><img src="/v/vspfiles/templates/90/images/buttons/btn_reviews_yes.gif" align="absmiddle" border="0"></a>
<a href="/reviewhelpful.asp?ProductCode=TRU%2DGDM49&ID=12&yes=no"><img src="/v/vspfiles/templates/90/images/buttons/btn_reviews_no.gif" align="absmiddle" border="0"></a>
</td>
<td width="1px" background="/v/vspfiles/templates/90/images/DBox_Border_Right.gif"><img src="/v/vspfiles/templates/90/images/clear1x1.gif" width="1" height="1"></td>
</tr><tr>
<td width="1px" valign="top"><img src="/v/vspfiles/templates/90/images/DBox_Border_Left_Bottom.gif"></td>
<td width="100%" valign="top" background="/v/vspfiles/templates/90/images/DBox_Border_Bottom.gif"><img src="/v/vspfiles/templates/90/images/clear1x1.gif" width="1" height="1"></td>
<td width="1px" valign="top"><img src="/v/vspfiles/templates/90/images/DBox_Border_Right_Bottom.gif"></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
【问题讨论】:
-
你有帮助的评论课有什么重要的吗? (我在搞乱你的代码,如果它很重要,我想包含它)如果是这样,你可以发布它吗?
-
@Thomas-Shields 是的,我有帮助的评论类里面有很多东西,我已经更新了上面的代码!
-
好问题顺便说一句。终于得到了我的答案,并且在制作过程中学到了很多东西。谢谢!