Mottie / tablesorter

Github fork of Christian Bach's tablesorter plugin + awesomeness ~
https://mottie.github.io/tablesorter/docs/
2.61k stars 754 forks source link

docs #109

Closed thezoggy closed 6 years ago

thezoggy commented 12 years ago

looking at the source for:

http://mottie.github.com/tablesorter/docs/example-meta-sort-list.html

    <!-- Tablesorter: optional -->
    <script src="../addons/pager/jquery.tablesorter.pager.js"></script>
    <script src="../js/jquery.metadata.js"></script>

so why do you include the pager.js but not the css?

looking at the source for:

http://mottie.github.com/tablesorter/docs/example-parsers-class-name.html I do NOT see the metadata.js being included.. so im just confused.. how it works.. or why its included on some metadata examples and not on others.. etc

anyways jump on irc if you wanna chat

Mottie commented 12 years ago

Yeah, well there are so many demos that I might have included some extra unused scripts. I just use a random demo, usually, as a template for the next demo page I make.

The class name demo doesn't use metadata.js at all. When ever you see a block similar to this:

Currently (versions 2.3+), parsers can be set using any of the following methods, in order of priority:

  • jQuery data data-sorter="text" (see the Javascript block below on how to set it directly).
  • metadata class="{ sorter: "text" }". This requires the metadata plugin.
  • headers option headers : { 0 : { sorter: "text" } }.
  • header class name class="sorter-text".

It means that each listed method does the same thing; but each item will over-ride the settings of all methods below it on that list. So for example, if you have a headers option set to sort text (headers : { 0 : { sorter: "text" } }), then later add jQuery data telling it to sort for a date ( data-sorter="shortDate"), the jQuery data (date) will override everything and set the parser to "shortDate". This is also why I wrote it like this:

jQuery data > metadata > headers option > header class name.

thezoggy commented 12 years ago

http://mottie.github.com/tablesorter/docs/example-widget-sticky-header.html

notice that the 'Courses (this is a TD cell)' cell is not colored for blue but is for green/uitheme. hence when you scroll down the page it is transparent and looks funky.

thezoggy commented 12 years ago

made this for kicks tonight: http://zoggy.net/ts/ts-table.html

Mottie commented 12 years ago

Hmm, I just realized that when I added detach() to remove the tbody for processing, it bumps the minimum jQuery requirement to 1.4+

thezoggy commented 12 years ago

btw mottie i'm back on irc 'zog-work'

thezoggy commented 12 years ago

idea for pagination style, look at how they do theirs: http://slickdeals.net/index.php?to=2012-08-12&page=2

thezoggy commented 12 years ago

this might help with the stickyHeaders - http://blog.jquery.com/2012/08/16/jquery-1-8-box-sizing-width-csswidth-and-outerwidth/