Button is not showing

Button is not showing

neha0719neha0719 Posts: 1Questions: 1Answers: 0
edited February 2020 in Free community support
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css"/>

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.1/css/buttons.dataTables.min.css" />

<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>

<script type="text/javascript" 
src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>

<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.1/js/dataTables.buttons.min.js"></script>

<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.1/js/buttons.colVis.min.js"></script>
<table id="example" class="display" style="width:100%">
    <thead>
        <tr>
            <th>Product</th>
            <th>Component</th>
            <th>Release</th>
            <th>Release start date</th>
            <th>Release end date</th>
            <th>Translation</th>
            <th>CTQ</th>
            <th>S1/S2</th>
            <th>Health</th>
        </tr>
    </thead>
</table>

<script>
    $(document).ready(function () {
        $('#example').DataTable({
            dom: 'Bfrtip',
            columnDefs: [
                {
                    targets: 1,
                    className: 'noVis'
                }
            ],
            buttons: [
                {
                    extend: 'colvis',
                    columns: ':not(.noVis)'
                }
            ]
        });
    });
</script>

Answers

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    Hi,

    I don't see any reason from the above as to why it wouldn't be showing. Could you possibly link to your page or a test case on http://live.datatables.net or JSFiddle showing the problem so I can take a look please?

    Thanks,
    Allan

This discussion has been closed.