Ordering only when click on icon
Ordering only when click on icon
tpaz
Posts: 1Questions: 1Answers: 0
Hi guys,
When I click anywhere on table header (th), the ordering function is called.
How can I do to ordering function be called only if i click on order icon?
Thanks
This discussion has been closed.
Answers
You'd need to use the
order.listener()
method to attach the event listener to a custom icon element. The problem is that the default DataTables sort icon is displayed by a CSS background image, so you can't specifically target only that with an event listener.Allan