tablesorter icon indicating copy to clipboard operation
tablesorter copied to clipboard

change HeaderSortUp & Down to glyphicon

Open oroalej opened this issue 10 years ago • 3 comments

How can i change the HeaderSortUp and HeaderSortDown to glyphicon of bootstrap..

oroalej avatar Aug 17 '14 01:08 oroalej

You know how to use Icon Fonts? Then look at these lines to see the related styles as an example: https://github.com/christianbach/tablesorter/blob/master/themes/green/style.css#L32-L39

RiZKiT avatar Aug 17 '14 10:08 RiZKiT

What I mean is the glyphicon class of bootstrap. "glyphicon glyphicon-chevron-up" and "glyphicon glyphicon-chevron-down"...

oroalej avatar Aug 18 '14 05:08 oroalej

The documentation specifies that you can send in specified css classes for these symbols with the option params cssAsc and cssDesc.

var opts = { 
    cssAsc: 'glyphicon glyphicon-chevron-up', 
    cssDesc: 'glyphicon glyphicon-chevron-down' 
};
$('#some-table').tablesorter(opts);

This might look a bit weird though, so you might perhaps want to change the method setHeadersCss to suit your needs by appending and removing a span element with these classes.

selbekk avatar Sep 03 '14 12:09 selbekk