Stupid-Table-Plugin icon indicating copy to clipboard operation
Stupid-Table-Plugin copied to clipboard

possible to specify an element trigger sorting other than default TH?

Open capturedghosts opened this issue 5 years ago • 0 comments

This is probably something exceedingly simple, but I'd like to trigger sorting on click of the title of the <th> only (maybe wrapped in a span?), as I have a second, more granular filtering mechanism in each <th> as well, and I don't want to sort when a user clicks on the icon that triggers my second filtering popup.

As written, the script sorts on-click anywhere within the <th>, and I'd like to prevent that from happening when clicking on the blue icon within the <th> below:

Untitled

And because the icon and dropdown are children of the <th>, clicking on anything inside the dropdown also sorts the table. I've tried using .not() with no success.

capturedghosts avatar Sep 08 '20 18:09 capturedghosts