How to add Back Button In Print Preview Page-Jquery Datatable -


how can add button in print preview page in jquery data table?

by default table tools using escape key navigating original page. instead need button in preview page, clicking on it, navigate previous page. button should have same functionality escape button doing.

how can achieve this?

there 'private' method in tabletools should here called _fnprintend can use end. need add click smessage , bind event it.

here's demo

$(document).ready(function () {     var otable = $('#example').datatable();      var otabletools = new tabletools(otable, {         "abuttons": [{             "sextends": "print",                 "smessage": '<div class="datatables-print-msg">' +                 '<a class="btn close-print" href="#">close print view</a>' +                 '</div>'         }]     });      // inject tabletools html before table     otable.before(otabletools.dom.container);      // bind our close function button prepend     // must use delegate because button won't exist yet.     $(document).delegate(".datatables-print-msg .close-print", "click", function (e) {         e.preventdefault();         otabletools._fnprintend(e);     }); }); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -