Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82027

Add customize function to DataTable print button after initialization?

$
0
0

I'm trying to customize a web app that allows custom javascript to be added.

I'm trying to set the CSS for the print button (https://datatables.net/extensions/buttons/examples/print/customisation.html), but I cannot set the "customize" parameter of the button, because the webapp has already initialized everything.

I can access the button through JavaScript, but I tried attaching a function like this:

$(document).ready(function() {
table.buttons('.buttons-print').customize = function(){ alert("TEST") };
});

but it simply doesn't work. I'm clearly missing something.

I tried checking the source code for the print button ( https://github.com/DataTables/Buttons/blob/master/js/buttons.print.js ) but that didn't clear anything up for me.

Does anyone know if what I'm trying to accomplish is possible?


Viewing all articles
Browse latest Browse all 82027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>