Prevent sorting icons to appear on demand

Prevent sorting icons to appear on demand

sfgolfersfgolfer Posts: 8Questions: 0Answers: 0
edited November 2013 in DataTables 1.9
I'm using the sample css file, jquery.dataTables.css and displaying several tables depending on user choice.

I have one particular table that I don't want the sorting icons to appear but still want the full sorting functionality. It is a rather dense table and having the icons appear makes it look somewhat crowded.

Possible to disable the icons from appearing on a particular table id?

Replies

  • sfgolfersfgolfer Posts: 8Questions: 0Answers: 0
    Update to this. I was able to accomplish this via CSS.

    HTML on the desired table, assign a class to each header:

    [code]

    [/code]

    Then in jquery.dataTables.css or your theme's CSS file:

    [code]
    table.classname thead tr th.nosorticon {
    background: url('');
    ...etc...
    }
    [/code]

    You will notice there is a Sorting section within jquery.dataTables.css which should be left alone in case you apply a product update.
This discussion has been closed.