mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Docs: accordion active tab refreshes widgets. See build table widget
This commit is contained in:
parent
b68abf09c1
commit
f24f15e10c
@ -306,6 +306,7 @@
|
||||
|
||||
$('#array2Table').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions : {
|
||||
// build_type : 'array', // can sometimes be detected if undefined
|
||||
build_source : arry,
|
||||
@ -349,6 +350,7 @@
|
||||
<pre class="prettyprint lang-js">$(function() {
|
||||
$('#string2Table').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions: {
|
||||
build_type : 'array',
|
||||
build_source : 'header 1,header 2,header 3;r1c1,r1c2,r1c3;r2c1,r2c2,r2c3;r3c1,r3c2,r3c3;"footer, 1","footer, 2","footer, 3"',
|
||||
@ -430,6 +432,7 @@
|
||||
<pre class="prettyprint lang-js">$(function() {
|
||||
$('#csv2Table').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions: {
|
||||
// *** build widget core ***
|
||||
build_type : 'csv',
|
||||
@ -495,6 +498,7 @@ Album,Artist,Price ($)</pre>
|
||||
<pre class="prettyprint lang-js">$(function() {
|
||||
$('#csv2Table2').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions: {
|
||||
// *** build widget core ***
|
||||
build_type : 'csv',
|
||||
@ -664,6 +668,7 @@ Album,Artist,Price ($)</pre>
|
||||
|
||||
$('#object2Table').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
data : dataObject, // same as using build_source (build_source would override this)
|
||||
widgetOptions : {
|
||||
// *** build object options ***
|
||||
@ -740,6 +745,7 @@ Album,Artist,Price ($)</pre>
|
||||
<pre class="prettyprint lang-js">$(function() {
|
||||
$('#object2Table2').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions: {
|
||||
build_type : 'json',
|
||||
build_source : { url: 'assets/build.json', dataType: 'json' }
|
||||
|
@ -17,6 +17,7 @@ $(function(){
|
||||
$('#array2Table').tablesorter({
|
||||
theme: 'blue',
|
||||
data : arry,
|
||||
widgets: ['zebra'],
|
||||
widgetOptions : {
|
||||
// build_type : 'array', // can be detected if undefined
|
||||
// build_source : arry, // overrides the data setting above
|
||||
@ -34,6 +35,7 @@ $(function(){
|
||||
// ***************************
|
||||
$('#string2Table').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions: {
|
||||
build_type : 'array',
|
||||
build_source : 'header 1,header 2,header 3;r1c1,r1c2,r1c3;r2c1,r2c2,r2c3;r3c1,r3c2,r3c3;"footer, 1","footer, 2","footer, 3"',
|
||||
@ -53,6 +55,7 @@ $(function(){
|
||||
// ***************************
|
||||
$('#csv2Table').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions: {
|
||||
// *** build widget core ***
|
||||
build_type : 'csv', // array, object, csv, ajax
|
||||
@ -87,6 +90,7 @@ $(function(){
|
||||
// ***************************
|
||||
$('#csv2Table2').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions: {
|
||||
// *** build widget core ***
|
||||
build_type : 'csv',
|
||||
@ -146,6 +150,7 @@ $(function(){
|
||||
$('#object2Table').tablesorter({
|
||||
theme: 'blue',
|
||||
data : dataObject,
|
||||
widgets: ['zebra'],
|
||||
widgetOptions : {
|
||||
// *** build object options ***
|
||||
build_objectRowKey : 'rows', // object key containing table rows
|
||||
@ -160,6 +165,7 @@ $(function(){
|
||||
// ***************************
|
||||
$('#object2Table2').tablesorter({
|
||||
theme: 'blue',
|
||||
widgets: ['zebra'],
|
||||
widgetOptions: {
|
||||
build_type : 'json',
|
||||
build_source : { url: 'assets/build.json', dataType: 'json' }
|
||||
|
@ -123,6 +123,10 @@
|
||||
$this.find('.accordion-link').click(function(){
|
||||
$this.accordion( "option", "active", $(this).data('index') );
|
||||
});
|
||||
},
|
||||
activate: function(e, ui) {
|
||||
// refresh zebra widget when rows are visible
|
||||
ui.newPanel.find('table').trigger('applyWidgets');
|
||||
}
|
||||
});
|
||||
// open parent of nested accordion
|
||||
|
Loading…
Reference in New Issue
Block a user