Home > Web Front-end > JS Tutorial > jquery implements table sorting + real-time search function

jquery implements table sorting + real-time search function

php中世界最好的语言
Release: 2018-04-26 09:20:09
Original
2697 people have browsed it

This time I will bring you jqueryimplementationtablesorting real-timesearch function, jquery realizes table sorting real-time search functionNotesWhat are they? Here are actual cases. Let’s take a look.

jquery implements table sorting + real-time search function

Copy code The code is as follows:

<table class="table-sort"> 
<thead> 
<tr> 
<th class="table-sort">First Name</th> 
<th class="table-sort">Last Name</th> 
<th class="table-sort">Email</th> 
<th>Phone Number</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td>John</td> 
<td>Smith</td> 
<td><a href="mailto:john.s">john.s</a></td> 
<td>(613) 873-2982</td> 
</tr> 
<tr> 
<td>Sean</td> 
<td>MacIsaac</td> 
<td><a href="mailto:seanjmacisaac">seanjmacisaac</a></td> 
<td>(613) 871-6191</td> 
</tr> 
<tr> 
<td>Tim</td> 
<td>Zarby</td> 
<td><a href="mailto:zarbytown214@hotmail.com">zarbytown214@hotmail.com</a></td> 
<td>(613) 743-5389</td> 
</tr> 
<tr> 
<td>Andrew</td> 
<td>Nichols</td> 
<td><a href="mailto:andy_money2003">andy_money2003</a></td> 
<td>(613) 741-3384</td> 
</tr> 
<tr> 
<td>Ally</td> 
<td>O'Neil</td> 
<td><a href="mailto:allyoneil">allyoneil</a></td> 
<td>(613) 642-9831</td> 
</tr> 
</tbody> 
</table> 
<br/> 
<p>To make a table searchable, add the class 'table-sort-search' to the <table> tag.<br/> 
<br/> 
<strong>Example:</strong></p> 
<pre class="brush:php;toolbar:false"><code class="html"><table class="table-sort table-sort-search"></table></code>
 
                                                             
Copy after login

I believe you have mastered the method after reading the case in this article. For more exciting things, please pay attention to php Chinese website Other related articles!

Recommended reading:

How to dynamically operate table rows with jquery (with code)

JS clicks on the small picture to associate the large picture

The above is the detailed content of jquery implements table sorting + real-time search function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template