Pager click event question
Pager click event question
mcgee
Posts: 10Questions: 5Answers: 0
Hi,
I want to launch an event when pages in the oager are clicked. I am using the examples shown in the documentation but I'm not having any success. I am using datatables 1.10.2. I'm niot getting any erros in the console but I'm not getting the simplest things to work such as alert('clicked') to launch when a page is clicked.
My code is as follows:
$(document).ready(function() { var table= $('#locations_datatable').dataTable({ "columns": [ { "name": "location" }, { "name": "value" }, { "name": "profile","orderable": false} ] ,"language": {"search": ""} ,"order": [[ 1, "desc" ]] ,"dom": 'frtp'}); table.on( 'page.dt', function () { //var info = table.page.info(); alert('hi'); } ); $('.dataTables_filter').addClass('input-append').addClass('pull-right'); $('').insertAfter('.dataTables_filter input'); } );Any ideas?
Thanks
This discussion has been closed.