When I click on a column to sort, pagination breaks, and column widths adjust (too wide).

When I click on a column to sort, pagination breaks, and column widths adjust (too wide).

TNTllcTNTllc Posts: 3Questions: 0Answers: 0
edited February 2014 in General
Initialization of the page works great, but when I click on a column header to sort by that column, the pagination breaks and it simply shows all 4000 rows in the data table.

Here's a sample: http://www.tntllc.net/nutrition/index.cfm

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    I don't know if this is the problem, but - why are you using tablesorter js? You also include a lot of other js files which don't seem to be relevant to that page.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Yup - tablesorter and DataTables on the same table doesn't really make any sense. And yes - it is breaking things.

    Allan
  • TNTllcTNTllc Posts: 3Questions: 0Answers: 0
    I'm not sure I understand what you're referring to, and I'll be the first to admit that I'm a real rookie at this stuff. I purchased a 'theme' called Cupcake admin from ThemeForest that had some standard include files. That's what I'm using as a template. It looks like they 'include' everything in the theme, just in case you want to use it? Any specific suggestions on how I might use one or the other and not both?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Look through your JS files for TableSorter - it must be initialised on the table somewhere / somehow. Disable it and hopefully things will start to work as expected.

    Allan
  • TNTllcTNTllc Posts: 3Questions: 0Answers: 0
    Thank you! I got it fixed, I trimmed all the includes back and that removed the conflict. Thanks for the heads up with the conflict when you include both tablesorter and datatables.

    Here's the fixed site: http://www.tntllc.net/nutrition/index.cfm
This discussion has been closed.