Hello everyone,
I am looking for a jquery code that will filter my table based on 4 different critera that I have set from the database.
The 4 critera is:
- Complete
- Pending
- Waiting for customer response
- Waiting for parts
The table is sortable using tablesorter jquery already but I want to add 5 checkboxes above that says:
Filter<form><input type="checkbox" name="All">Show All<input type="checkbox" name="Complete" />Complete<input type="checkbox" name="Pending" />Pending<input type="checkbox" name="Waiting for customer response" />Complete<input type="checkbox" name="Waiting for parts" />Waiting for parts</form>
<table cellpadding="1" cellspacing="1">
<thead>
<tr>
<th> </th>
<th>Ticket #</th>
<th>Customer</th>
<th>Status</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<tr>
<tr bgcolor="#7BCC70" >
<td><b>1</b></td>
<td align="center" height='35px'><a title="View details of ticket 248341" href="ticketdetails.php?ticketid=248341"><b>248341</b></a></td>
<td align="center" height='35px'><b>John Smith</b></td>
<td align="center" height='35px'><b>Complete</b></td>
<td align="center" height='35px'><a title="Edit ticket info" href="editticket.php?ticketid=248341"><b>Edit</b></a></td>
<td align="center" height='35px'><a id="commentDelete" onClick="return delTicket(this.id);" title="Delete ticket" href="?del=248341"><b>Delete</b></a></td></tr>
<tr bgcolor="#7BCC70" >
<td><b>2</b></td>
<td align="center" height='35px'><a title="View details of ticket 522303" href="ticketdetails.php?ticketid=522303"><b>522303</b></a></td>
<td align="center" height='35px'><b>Jane Smith</b></td>
<td align="center" height='35px'><b>Waiting for parts</b></td>
<td align="center" height='35px'><a title="Edit ticket info" href="editticket.php?ticketid=522303"><b>Edit</b></a></td>
<td align="center" height='35px'><a id="commentDelete" onClick="return delTicket(this.id);" title="Delete ticket" href="?del=522303"><b>Delete</b></a></td></tr>
<tr bgcolor="#7BCC70" >
<td><b>3</b></td>
<td align="center" height='35px'><a title="View details of ticket 122588" href="ticketdetails.php?ticketid=122588"><b>122588</b></a></td>
<td align="center" height='35px'><b>John Q. Test</b></td>
<td align="center" height='35px'><b>Waiting for customer response</b></td>
<td align="center" height='35px'><a title="Edit ticket info" href="editticket.php?ticketid=122588"><b>Edit</b></a></td>
<td align="center" height='35px'><a id="commentDelete" onClick="return delTicket(this.id);" title="Delete ticket" href="?del=122588"><b>Delete</b></a></td></tr>
<tr bgcolor="#7BCC70" >
<td><b>4</b></td>
<td align="center" height='35px'><a title="View details of ticket 122589" href="ticketdetails.php?ticketid=122589"><b>122589</b></a></td>
<td align="center" height='35px'><b>John Q. Test</b></td>
<td align="center" height='35px'><b>Pending</b></td>
<td align="center" height='35px'><a title="Edit ticket info" href="editticket.php?ticketid=122589"><b>Edit</b></a></td>
<td align="center" height='35px'><a id="commentDelete" onClick="return delTicket(this.id);" title="Delete ticket" href="?del=122589"><b>Delete</b></a></td></tr>
</tbody>
</table>
Any ideas?
This is the tablesorter I am using.