WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] background color of columns (2 posts)

  1. Hockeyguy1925
    Member
    Posted 1 year ago #

    Hi Tobias
    I am trying to change the background color of a single column, that when that certain column is clicked on to sort the back ground changes color for every row as in this table Here Can you help with this

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    something like this can be achieved by adding a command for the DataTables JS library, and then some CSS styling. Please try adding

    "bSortClasses": true

    to the "Custom Commands" textfield on the "Edit" screen of the table.
    This will basically tell the sorting to extend the column that's currently sorted on, with a CSS class "sorting_1".
    You can then style that with "Custom CSS" like this:

    .tablepress tbody tr .sorting_1 {
      background-color: #ff0000;
    }

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic