0
我今天工作並決定開始使用JQUERY爲搜索網站製作切換表...但我幾乎是在前幾天開始使用javascript和jquery。沒有表格,它工作正常,但是當我添加表格時,它不會切換表格...我希望當您單擊「篩選搜索」時將表格放在下面,然後再次單擊過濾器搜索以隱藏表...任何幫助非常感謝。繼承人的代碼(我已經在頭jQuery的引用)不能正常工作errorJQuery切換...很可能很容易
<div class='filtermore'>
<h4><a>Filter Search</a></h4>
<p style="display: none" class='jquery'>
<table border=0 width="875">
<tbody>
<tr>
<td width="164"><strong>City</strong></td>
<td width="176"><strong>Price</strong></td>
<td width="160"><strong>Features</strong></td>
</tr>
<tr>
<td><input type="checkbox"/> City 1</td>
<td><input type="checkbox"/> Cheap</td>
<td><input type="checkbox"/> Financing Available</td>
<td width="357"><input type="checkbox"/> Good for kids</td>
</tr>
<tr>
<td><input type="checkbox"/> City 2</td>
<td><input type="checkbox"/> Moderate</td>
<td><input type="checkbox"/> Smoking</td>
<td><input type="checkbox"/> Accepts Credit Cards</td>
</tr>
<tr>
<td><input type="checkbox"/> City 3</td>
<td><input type="checkbox"/> Expensive</td>
<td><input type="checkbox"/> Alcohol</td>
<td><input type="checkbox"/> Delivery</td>
</tr>
</tbody>
</table>
</p>
<script>
$("h4").click(function() {
$(".jquery").toggle("slow");
});
</script>
</div>
是令人驚訝的工作謝謝......也使automatticaly所示的表是有辦法隱藏它在第一,然後當你點擊讓它出現? –
是的,像你在桌子上的其他地方一樣使用CSS。將此添加到表格中: style =「display:none;」 – rncrtr
非常感謝 –