Use jquery's Tablesorter plugin for table sorting

Source: Internet
Author: User

Today in the study of Bootstrap, suddenly saw Tablesorter this east, immediately Baidu a bit, found this stuff.

Use jquery's Tablesorter plugin for table sorting

So here's what I saw in the project today. Sort of tables used by predecessors

  

Tablesorter's official website: http://tablesorter.com/docs/

How to use: 1. Download Tablesorter http://tablesorter.com/jquery.tablesorter.zip

2. Unzip the file and import jquery and jquery.tablesorter.min.js into the project file

3. Modify the HTML:

1). Add Link

<script type= "Text/javascript" src= '/pagemedia/js/jquery.tablesorter.min.js ' ></script>

<script type= "Text/javascript" src= '/pagemedia/js/jquery.min.js ' ></script>

2). Modify the table

<table id= "myTable" class= ' Tablesorter ' > Add ID and class,class for table Tablesorter.

(Note: Table must have thead and tbody)

3). Add JavaScript Script:

<script>

$ (document). Ready (function () {$ ("#myTable"). Tablesorter (); });

</script>

The above sentence is most of the online writing, I found in the project writing is this:

  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.