How do I select rows depending on what's in an input box? Here's what I have so far:
<html>
<head>
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1");
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#btnFilter').keyup(function() {
var myInput = $(this).val();
$('tbody tr').hide();
// I need to .show() all table rows that have a table cell with a value that begins with the input field.
$('tr').something goes here.show();
});
});
</script>
</head>
<body>
<form>
<input id="btnFilter" name="btnFilter">
</form>
<table>
<thead>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>X</td>
</tr>
<tr>
<td>ABC</td>
<td>D</td>
</tr>
</tbody>
</table>
</body>
</html>