Closed thezoggy closed 6 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.
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.
made this for kicks tonight: http://zoggy.net/ts/ts-table.html
Hmm, I just realized that when I added detach()
to remove the tbody for processing, it bumps the minimum jQuery requirement to 1.4+
btw mottie i'm back on irc 'zog-work'
idea for pagination style, look at how they do theirs: http://slickdeals.net/index.php?to=2012-08-12&page=2
this might help with the stickyHeaders - http://blog.jquery.com/2012/08/16/jquery-1-8-box-sizing-width-csswidth-and-outerwidth/
looking at the source for:
http://mottie.github.com/tablesorter/docs/example-meta-sort-list.html
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