Print Button not working after adding custom classname

Print Button not working after adding custom classname

march361march361 Posts: 3Questions: 2Answers: 0

I use the following code to add buttons to print and it succeed.
buttons: [ 'print', ]
However, the code failed when I add my own classname like these:
buttons: [{text:'print' , className: 'dt-button buttons-copy buttons-html5 btn btn-Primary'} ]

How can I add custom className and keep it orginal property ?
Thank you.

Answers

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    I this you want to use the object extend not text, like this:

    buttons: [{extend:'print' , className: 'dt-button buttons-copy buttons-html5 btn btn-Primary'} ]
    

    Kevin

Sign In or Register to comment.