Call stateChange before the other callbacks
Currently, the stateChange callback is the last function to be called after hiding/showing a column (colVis.js:640).
If stateChange callback is moved to a place before the other callbacks, then an application can know which column was hidden/shown before the table redraws. The main use case for this is when I'm tracking column visibility outside of the dataTables API and need to use it during one of the other callbacks, like createdRow or rowCallback. I add data-* attributes to DOM elements during the other callbacks based on which columns are visible.
Probably best to have both callbacks - pre and post thinking about it.
ColVis is due for a rewrite, so I'll make sure to look into this when I get to that.
Ok. I'm happy to put together a pull request for a pre callback if you don't think you'll get to the ColVis rewrite for a while.