How to sort column when you click on sorting icons(Up/Down arrows)..?
How to sort column when you click on sorting icons(Up/Down arrows)..?
![vijaykumarvemula](https://secure.gravatar.com/avatar/eaf6599c9a096ae474f01c5055220e7f/?default=https%3A%2F%2Fvanillicon.com%2Feaf6599c9a096ae474f01c5055220e7f_200.png&rating=g&size=120)
I am using Jquery datatable. Sorting is done when you click on entire header. But i want to sort only when we click on sort icon end of the header(up/down arrows). how can we achieve this..? I tried like this but it not working for me..
var contactTable = j$('[id$="safetyContractTables"]').DataTable({
"aaSorting": [],
"bPaginate":false,
"bInfo": false,
"bSort":{!if(isEditMode, "false","true")},
"bstateSave": true,
});
j$('.filter').on('click', function(){
contactTable.stopPropagation();
});
each header added filter class like <th class="filter"></th>.