retreive column idx when clicking on header
retreive column idx when clicking on header
jfr
Posts: 71Questions: 24Answers: 0
Hi
I would like to retrieve a column header when right clicking on column header
I get div.DataTables_sort_wrapper or th.sorting in this when jQuery("#mytable thead").on("click", "th", function(event)
Can't fin how if the click is not in the tbody
Thank in advance
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
To get the column index when clicking in the header you could use:
Allan
Hi Allan
I have tried a couple of thing
The only one that get fire is the first one and this has only the hmtl of the thead
What I am trying to do is to initializes a qtip menu with column header and index data on right click
Thanks in advance
The first one isn't going to work as
this
is thethead
- likewise the third. The second looks like it should - what happens if you use it? What about if you addconsole.log( this );
?Can you link to the page please so I can take a look?
Allan
Hi Allan
I have done the following
It works
I am thinking of moving the code in drawCallback instead
PS
I had the same working result with
Thanks a lot for your precious help