So basically I am running a mysql query that fetches data from my database and displays it in an easy to read layout for my users.
Name-----Address----Sales Person
You get the gist. And now I want to let the user sort the html table by let’s say sales person. How would I easily do that using a drop down menu?
<div class='menu'>
<ul>
<li><a href='#'><span>Sales Person</span></a>
<ul>
<li><a href='#'><span>Melissa</span></a></li>
<li><a href='#'><span>Justin</span></a></li>
<li><a href='#'><span>Judy</span></a></li>
<li><a href='#'><span>Skipper</span></a></li>
<li><a href='#'><span>Alex</span></a></li>
</ul>
</li>
</ul>
</div>
Check if you could go with any of the below mentioned JQuery plugins. Simply awesome and provide wide range of options to work through, and less pains to integrate. 🙂
https://github.com/paulopmx/Flexigrid – Flexgrid
http://datatables.net/index – Data tables.
https://github.com/tonytomov/jqGrid
If not, you need to have a link to those table headers that calls a server-side script to invoke the sort.