Events not working after pagination
Events not working after pagination
OBCENEIKON
Posts: 9Questions: 0Answers: 0
My event handlers are being lost after going to the next page of results. I have tried to use both "on" and "delegate."
[code]$('input[type="checkbox"]').on('change', function() {[/code]
[code]$('tr').delegate('input[type="checkbox"]', 'change', function() {[/code]
Here is a link to a fiddle.
http://jsfiddle.net/AapFe/
I've gotta be missing something really obvious here, I think I have been looking at this code for too long.
[code]$('input[type="checkbox"]').on('change', function() {[/code]
[code]$('tr').delegate('input[type="checkbox"]', 'change', function() {[/code]
Here is a link to a fiddle.
http://jsfiddle.net/AapFe/
I've gotta be missing something really obvious here, I think I have been looking at this code for too long.
This discussion has been closed.
Replies
Allan
Live events / Pre-init / Post-init
http://datatables.net/release-datatables/examples/advanced_init/events_live.html
http://datatables.net/release-datatables/examples/advanced_init/events_pre_init.html
http://datatables.net/release-datatables/examples/advanced_init/events_post_init.html