colreorder looses javascript hidden on documentReady
colreorder looses javascript hidden on documentReady

Link to test case: https://live.datatables.net/faxajali/1/edit
Hello,
in a datatable, if i have a span(id='toto') that i hide on document ready.
When i see the datable, it is hidden but after doing a colreorder, it is not hidden anymore.
Can i change something in my code to make it works?
thanks
This question has an accepted answers - jump to answer
Answers
You could use CSS instead like this:
https://live.datatables.net/faxajali/2/edit
If this isn't what you want then please provide more details about how you want to hide the
span
so we can provide a more specific answer.Kevin
Thans for the css but i have to make it with javascript.
I just made an easy example to understand why the javascript effect was removed.
Because i have also problems with other javascript like event added.
For example if i add an click event on TOTO, it works before colreorder but not after
https://live.datatables.net/faxajali/3/edit
The problem is the event handler is lost when Datatables rewrites the cells when the columns are moved. Use delegated events to handle this properly. See this example. Updated test case:
https://live.datatables.net/weyomixe/1/edit
Kevin
thank you, perfect for me