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

How can I remove the dropdown blank below one column and not the others?

$
0
0

Greetings,

As the title states, I would like to remove one out of 6 drop-down form blanks below the columns.

Here is the screenshot of the table on my website: http://imgur.com/cyKdqoB

I would like to remove the form below the "Game Name" column.

This is the JavaScript i'm including for the blanks as well as some other elements in the table:

$(document).ready(function() {
    $('#example').DataTable( {
    "paging":   true,
    "ordering": false,
     "info":     true,
    "scrollY": "400px",
    "scrollCollapse": true,
  "  paging": true,
        initComplete: function () {
            this.api().columns().every( function () {
                var column = this;
                var select = $('<select><option value=""></option></select>')
                    .appendTo( $(column.footer()).empty() )
                    .on( 'change', function () {
                        var val = $.fn.dataTable.util.escapeRegex(
                            $(this).val()
                        );

                        column
                            .search( val ? '^'+val+'$' : '', true, false )
                            .draw();
                    } );

                column.data().unique().sort().each( function ( d, j ) {
                    select.append( '<option value="'+d+'">'+d+'</option>' )
                } );
            } );
        }
    } );
} );

And this is the URL of the page I'm using the table on: http://game-explorer.webege.com/table.html

Thank you in-advance. I don't know much JS so that is why I'm seeking help :) I hope someone can help.


Viewing all articles
Browse latest Browse all 82602

Latest Images

Trending Articles



Latest Images

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