diff --git a/css/theme.bootstrap.css b/css/theme.bootstrap.css
index 9aa55311..2ce7c9f1 100644
--- a/css/theme.bootstrap.css
+++ b/css/theme.bootstrap.css
@@ -62,7 +62,7 @@
}
/* caption */
-caption {
+.caption {
background: #fff;
}
diff --git a/css/theme.jui.css b/css/theme.jui.css
index da00e00f..2108f717 100644
--- a/css/theme.jui.css
+++ b/css/theme.jui.css
@@ -79,8 +79,8 @@
}
/* caption */
-caption {
- background: #fff;
+.tablesorter-jui caption {
+ border: 0;
}
/* filter widget */
diff --git a/docs/example-widget-ui-theme.html b/docs/example-widget-ui-theme.html
index c21b6027..ed3c36fc 100644
--- a/docs/example-widget-ui-theme.html
+++ b/docs/example-widget-ui-theme.html
@@ -120,6 +120,7 @@
+ Some interesting caption
First Name |
diff --git a/docs/index.html b/docs/index.html
index 66774d95..7656394a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -313,7 +313,7 @@
Sticky header widget (v2.0.21.1; v2.10)
UITheme widget:
diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js
index 57fc70f0..88899138 100644
--- a/js/jquery.tablesorter.widgets.js
+++ b/js/jquery.tablesorter.widgets.js
@@ -17,6 +17,7 @@ var ts = $.tablesorter = $.tablesorter || {};
ts.themes = {
"bootstrap" : {
table : 'table table-bordered table-striped',
+ caption : 'caption',
header : 'bootstrap-header', // give the header a gradient background
footerRow : '',
footerCells: '',
@@ -32,6 +33,7 @@ ts.themes = {
},
"jui" : {
table : 'ui-widget ui-widget-content ui-corner-all', // table classes
+ caption : 'ui-widget-content ui-corner-all',
header : 'ui-widget-header ui-corner-all ui-state-default', // header classes
footerRow : '',
footerCells: '',
@@ -167,10 +169,13 @@ ts.addWidget({
sh = 'tr.' + (wo.stickyHeaders || 'tablesorter-stickyHeader'),
rmv = o.sortNone + ' ' + o.sortDesc + ' ' + o.sortAsc;
if (c.debug) { time = new Date(); }
+ // initialization code - run once
if (!$t.hasClass('tablesorter-' + theme) || c.theme === theme || !table.hasInitialized){
// update zebra stripes
if (o.even !== '') { wo.zebra[0] += ' ' + o.even; }
if (o.odd !== '') { wo.zebra[1] += ' ' + o.odd; }
+ // add caption style
+ $t.find('caption').addClass(o.caption);
// add table/footer class names
t = $t
// remove other selected themes; use widgetOptions.theme_remove