Sorting lists in tables, implemented with jquery + php
阿神
阿神 2017-05-16 12:02:05
0
5
750

To implement sorting of lists, multiple fields can be sorted, such as time, id, quantity, etc. What is the specific implementation idea?

阿神
阿神

闭关修行中......

reply all(5)
过去多啦不再A梦

Similar to paging, I want to bind a click event to each filter area. When clicked, the field to be filtered will be obtained. Then you can get the desc or asc style of the area, and then return to the background order, return data, and display the data

迷茫

I happened to see this case while reading "The Definitive Guide to JavaScript" this morning. I took a photo and shared it with you

Finally just submit the return value to the server

I also made a table sorting requirement last month. I used the AngularJS plug-in ui-grid to do it, which is very convenient

世界只因有你

1. If the amount of data is large and paging is required, pass the field names and sorting methods to be sorted to the backend;

2. The amount of data is small, no paging is needed, or front-end paging can be used, and sorting can be achieved through js.

巴扎黑

Can be sorted directly on the front end, such as the Bootstrap Datatable plug-in.

巴扎黑

DataTables

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template