$(function () { // Extend the themes to change any of the default class names ** NEW ** $.extend($.tablesorter.themes.jui, { // change default jQuery uitheme icons - find the full list of icons here: http://jqueryui.com/themeroller/ (hover over them for their name) table: 'ui-widget ui-widget-content ui-corner-all', // table classes caption: 'ui-widget-content ui-corner-all', header: 'ui-widget-header ui-corner-all ui-state-default', // header classes footerRow: '', footerCells: '', icons: 'ui-icon', // icon class added to the in the header sortNone: 'ui-icon-carat-2-n-s', sortAsc: 'ui-icon-carat-1-n', sortDesc: 'ui-icon-carat-1-s', active: 'ui-state-active', // applied when column is sorted hover: 'ui-state-hover', // hover class filterRow: '', even: 'ui-widget-content', // odd row zebra striping odd: 'ui-state-default' // even row zebra striping }); $("#large") .tablesorter({ sortList: [[0, 0]], widthFixed: true, headerTemplate: '{content} {icon}', // needed to add icon for jui theme theme: 'jui', // theme "jui" and "bootstrap" override the uitheme widget option in v2.7+ // widget code now contained in the jquery.tablesorter.widgets.js file widgets: ['uitheme', 'stickyHeaders', 'filter', 'zebra'],//zebra alterner couleur ligne widgetOptions: { // filter_anyMatch replaced! Instead use the filter_external option // Set to use a jQuery selector (or jQuery object) pointing to the // external filter (column specific or any match) filter_external: '.search', // include column filters filter_columnFilters: true, filter_placeholder: { search: 'Search...' }, filter_saveFilters: true, filter_reset: '.reset', //Entete fixe // extra class name added to the sticky header row stickyHeaders: '', // number or jquery selector targeting the position:fixed element stickyHeaders_offset: 0, // added to table ID, if it exists stickyHeaders_cloneId: '-sticky', // trigger "resize" event on headers stickyHeaders_addResizeEvent: true, // if false and a caption exist, it won't be included in the sticky header stickyHeaders_includeCaption: true, // The zIndex of the stickyHeaders, allows the user to adjust this to their needs stickyHeaders_zIndex: 2, // jQuery selector or object to attach sticky header to stickyHeaders_attachTo: null, // scroll table top into view after filtering stickyHeaders_filteredToTop: true, } }) .tablesorterPager({ container: $(".ts-pager"), // target the pager page select dropdown - choose a page cssGoto: ".pagenum", // remove rows from the table to speed up the sort of large tables. // setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled. removeRows: false, // output string - default is '{page}/{totalPages}'; // possible variables: {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows} output: '{startRow} - {endRow} / {filteredRows} ({totalRows})' }); });