だから私はjqueryでフォームを送信して隠したり表示したりしようとしています。
しかし、再送信しても機能しません。
HTML:
<form id="filters" href="#">
<table id="filter" class="table">
<thead>
<tr>
<th>Show/Hide</th><th>Column</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="checkbox" name="checkNumber" value="1"/>
</td>
<td>
Account Number
</td>
</tr>
</tbody>
</table>
</form>
Jクエリ:
$(function() {
$('#filters').submit(function() {
if ($('input[name=checkNumber]').attr('checked') == true) {
$('input[name=search_account]').show("normal");
}
else if ($('input[name=checkNumber]').attr('checked') !== true) {
$('input[name=search_account]').hide("normal");
}
return false;
});
});
他の方法もいろいろ試しましたが、どれも同じです。送信すると、正しい入力タグが非表示になりますが、再送信して表示すると機能しません。
チェックボックスをオンにして送信しても機能しません。
どんな助けでも大歓迎です!