Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81688

Capturing Sort Column and Direction

$
0
0
I have a nice jQuery datatable happening with sortable columns. A request came in to capture 1) The column that was clicked on and 2) the sort direction at the time of the click. I've looped through various sort related objects in the datatables object but cannot seem to get those two singular values.

For the purpose of this question, I would like the end result to be something like alert('You clicked the column ' + column) and alert('The sort direction you clicked on was ' + sort direction).

How do I accomplish this? As always, thanks in advance.

Viewing all articles
Browse latest Browse all 81688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>