JQuery DataTables - Row click not registering on pages other than first?

I'm guessing the event handler binding is being applied only to the initially loaded rows. But once the row collection gets re-rendered in the markup, the event handlers are no more.

I'm guessing the event handler binding is being applied only to the initially loaded rows. But once the row collection gets re-rendered in the markup, the event handlers are no more. Check out jQuery's live() function.

The key there being that event handlers are bound for all elements meeting selector criteria "now and in the future.

Right of course, cheers. Odd it worked on the first page (all rows are loaded dynamically) but nonetheless I think this is the answer. I'll confirm and accept accordinging shortly.

– Graphain May 13 at 0:01 1 That makes sense if you load the rows BEFORE defining the click() handler. – Kon May 13 at 0:02 Of course - I had put the click in my ajaxComplete handler thinking that DataTables was loading all the rows and just hiding them. However, that only attaches to the first page because that's all the DataTables renders (the rest being kept in memory).

Making it $('#dt tbody tr'). Live('click', function () etc. Fixes it (and in fact can be declared outside the ajaxComplete because of the "now and in the future" bit you mention. – Graphain May 13 at 0:03.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions