Change appearance of buttons

Change appearance of buttons

montoyammontoyam Posts: 568Questions: 136Answers: 5

I thought I would share some code I was given to change the appearance of the buttons. I didn't see this in any of the dataTables manuals or documentation.

This requires FontAwesome.

            buttons: {
                buttons: [
                    { extend: 'create', editor: CallManager_DeptFundOrgEditor, text: '<span class="fa fa-plus-circle fa-2x icon-purple"></span>', className: 'btn', titleAttr: 'Add Fund/Org' },
                    { extend: 'edit', editor: CallManager_DeptFundOrgEditor, text: '<span class="fa fa-edit fa-2x icon-purple"></span>', className: 'btn', titleAttr: 'Edit Fund/Org' },
                    {
                        extend: 'excelHtml5',
                        text: '<span class="fa fa-file-excel-o fa-2x icon-purple"></span>', className: 'btn', titleAttr: 'Export to Excel'
                    }
                ],
                dom: {
                    button: { tag: 'i', className: '' }
                }
            }

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Nice, thanks for sharing,

    Colin

Sign In or Register to comment.