Link to home
Start Free TrialLog in
Avatar of SimonPrice3376
SimonPrice3376

asked on

Sort Order Icons on HTML Table

Hi Experts,

I am in need of some help regarding the use of Icons in a table sort function.

What I am after is to show a stacked caret as seen here Font Awesome and I want to click the top caret to sort ascending, and the lower caret to sort descending but am unsure how to do this.

if this is not possible, i want to stack this sort asc on top of sort desc icons and show which is the active sort.

The table will only ever be sorting on the one column and the but I'm not sure how to achieve this.

If anyone can be of any help that would be very much appreciated.

thanks
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Normally I sort the data correctly when I retrieve it from the database.  Then again, we do paging so not all the data is available on the page.  when a new sort is done, we make a round-trip to the database.

There are some JQuery/JavaScript examples out there on sorting data on the client side.
ASKER CERTIFIED SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SimonPrice3376

ASKER

Thats what I thought it would be, its either that or have the icons side by side i guess