Search code examples
jquerytablesorter

Jquery tablesorter chrome support


I am using the jQuery table sorter. The columns have fixed widths which are rendered correctly in Firefox, but completely ignored in Chrome.

This is my configuration of the plugin. Any idea what I can do to make fixed-width columns in Chrome? Or is Chrome not supported?

   var tableSorterOptions = {
           widthFixed : true
          ,showProcessing: true
          ,widgets: [ 'stickyHeaders', 'filter' ]
          ,widgetOptions: {
              // 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,

              filter_hideFilters:true
           }
       };

Solution

  • In the end I had to add % widths to every th then it functioned the same in both browsers. Looking at the website closer it does not claim to be compatible with Chrome so I guess this is ultimately my problem in using Chrome.

    https://mottie.github.io/tablesorter/docs/#Compatibility