Skip to content

Instantly share code, notes, and snippets.

@ko31
Created December 18, 2016 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ko31/8d917d87b366e55ed0ceb1e8ed756795 to your computer and use it in GitHub Desktop.
Save ko31/8d917d87b366e55ed0ceb1e8ed756795 to your computer and use it in GitHub Desktop.
jQuery quicksearch plug-in example
<form>
<input type="text" id="search" placeholder="検索キーワードを入れてください">
</form>
<table class="list" id="tabledata">
<tbody>
<tr>
<th>棋士番号</th>
<th>氏名</th>
<th>出身地</th>
<th>区分</th>
</tr>
<tr class="data">
<td>175</td>
<td><a href="http://www.shogi.or.jp/player/pro/175.html" target="_blank">羽生善治</a></td>
<td>埼玉県所沢市</td>
<td>棋士</td>
</tr>
</tbody>
</table>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/jquery.quicksearch.min.js"></script>
<script>
$('input#search').quicksearch('table tbody tr.data');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment