I am close to losing my mind. I am working on a project for a big company, over their framework. They rely heavily on the jQuery.datatables plugin which is not a bad thing, but the documentation seems to me to be very poor and confusing and the source code very hard to understand.
Short Version: I need to know how to hook up with the page changed event, so i can execute some code when it happens.
Long Version: I have a json array of data to put in the table, the items don’t come with a unique identifier; so, before sending it to the dataTable i add a column id that is filled with the item’s index in the array and create a column for it. After i invoke fnUpdate, i hide the index column and add a click event for each row, using the value on that column to know which json object corresponds to that row. It’s not pretty, but it works, right until the time i change pages; at that time, the is still hidden, but the s show up again. I need to find how to hook in the page change event so i can hide them again, or i need a more elegant way to do the same trickery.
Thank you for your time
You could use fnDrawCallback or fnInfoCallback to detect changes. When next is clicked both of them are fired.
But beware, page changes are not the only source that can fire those callbacks.
Or you could try something like this: