我試圖與jQuery的滑動表,但因爲jQuery滑動不起作用了桌子太好我必須包裝jQuery的搜索直通多個div
我已經嘗試在div的內容寫類似:
$("div.headhook").mouseenter(function() {
//$(this).parent().next("div.bodyhook").slideToggle("slow");
$(this).closest("div").nextAll("div.bodyhook").slideToggle("fast");
});
,但它不工作
這裏是我的表結構的一部分(有更多theads和tbodys):
<table id="forum-0" class="forum-table">
<thead class="thead5" style=""><tr id="forum-list-5" class="odd first-row container container-5" >
<th colspan="5" class="container">
<div id="headhook5" class="headhook">
<div class="forum-details">
<div class="container_name name">
<a href="/forum/5">Forum title</a>
</div>
<div class="description">Forum description</div>
</div>
</div>
</th>
<tr><td colspan="5" class="container_header"></td></tr>
</tr>
</thead>
<tbody class="tbody5">
<tr class="accordion-fix"><td colspan="5" width="940px" height="0" class="accordion-fix">
<div id="bodyhook5" class="bodyhook">
<table>
<tr id="forum-list-11" class="even middle-row in-container-0">
<td class="forum-icon"> <span id="thmr_23" class="thmr_call">
<img src="/sites/all/modules/advanced_forum/styles/naked/images/forum-folder.png" alt="folder" title="folder" width="30" height="27" /></span>
</td>
<td class="forum-name2">
<div class="forum-details">
<div class="name"><a href="/forum/11">Forum A</a></div>
</div>
</td>
<td class="topics">
<div class="num num-topics">
1 </div>
</td>
<td class="num posts">
2 </td>
<td class="last-reply">
<span class="last-reply-timestamp">2010-11-09 11:51</span> <br/>
<span class="last-reply-name">jan</span>
</td>
</tr>
</table>
<table>
<tr id="forum-list-12" class="odd middle-row in-container-0">
<td class="forum-icon"> <span id="thmr_24" class="thmr_call">
<img src="/sites/all/modules/advanced_forum/styles/naked/images/forum-folder.png" alt="folder" title="folder" width="30" height="27" /></span>
</td>
<td class="forum-name2">
<div class="forum-details">
<div class="name"><a href="/forum/12">Forum B</a></div>
</div>
</td>
<td class="topics">
<div class="num num-topics">
0 </div>
</td>
<td class="num posts">
0 </td>
<td class="last-reply">
<span class="last-reply-timestamp"></span> <br/>
<span class="last-reply-name"></span>
</td>
</tr>
</table>
<table>
<tr id="forum-list-13" class="even middle-row in-container-0">
<td class="forum-icon"> <span id="thmr_25" class="thmr_call">
<img src="/sites/all/modules/advanced_forum/styles/naked/images/forum-folder.png" alt="folder" title="folder" width="30" height="27" /></span>
</td>
<td class="forum-name2">
<div class="forum-details">
<div class="name"><a href="/forum/13">Forum C</a></div>
</div>
</td>
<td class="topics">
<div class="num num-topics">
0 </div>
</td>
<td class="num posts">
0 </td>
<td class="last-reply">
<span class="last-reply-timestamp"></span> <br/>
<span class="last-reply-name"></span>
</td>
</tr>
</table>
</div>
</td></tr>
</tbody>
您收到任何錯誤? – Vivek 2010-12-13 12:13:00
沒有錯誤,但div.bodyhook保持不活動 – satanowicz 2010-12-13 12:39:01