mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-12-05 05:04:20 +00:00
Docs: improve bootstrap example in column selector docs
This commit is contained in:
parent
f4381c0c02
commit
ebec6e9105
@ -83,9 +83,6 @@
|
|||||||
#popover-target input {
|
#popover-target input {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
.popover {
|
|
||||||
margin-top: -65px; /* adjust popover position */
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script id="js">$(function() {
|
<script id="js">$(function() {
|
||||||
@ -133,24 +130,23 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
/*** Bootstrap popover demo ***/
|
/*** Bootstrap popover demo ***/
|
||||||
$('#popover')
|
|
||||||
.popover({
|
|
||||||
placement: 'right',
|
|
||||||
html: true, // required if content has HTML
|
|
||||||
content: '<div id="popover-target"></div>'
|
|
||||||
})
|
|
||||||
// bootstrap popover event triggered when the popover opens
|
|
||||||
.on('shown.bs.popover', function () {
|
|
||||||
// call this function to copy the column selection code into the popover
|
|
||||||
$.tablesorter.columnSelector.attachTo( $('.bootstrap-popup'), '#popover-target');
|
|
||||||
});
|
|
||||||
|
|
||||||
// initialize column selector using default settings
|
// initialize column selector using default settings
|
||||||
// note: no container is defined!
|
// note: no container is defined!
|
||||||
$(".bootstrap-popup").tablesorter({
|
$(".bootstrap-popup").tablesorter({
|
||||||
theme: 'blue',
|
theme: 'blue',
|
||||||
widgets: ['zebra', 'columnSelector', 'stickyHeaders']
|
widgets: ['zebra', 'columnSelector', 'stickyHeaders']
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// call this function to copy the column selection code into the popover
|
||||||
|
$.tablesorter.columnSelector.attachTo( $('.bootstrap-popup'), '#popover-target');
|
||||||
|
|
||||||
|
$('#popover')
|
||||||
|
.popover({
|
||||||
|
placement: 'right',
|
||||||
|
html: true, // required if content has HTML
|
||||||
|
content: $('#popover-target')
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -502,6 +498,10 @@
|
|||||||
Select Column
|
Select Column
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<div class="hidden">
|
||||||
|
<div id="popover-target"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="tablesorter bootstrap-popup">
|
<table class="tablesorter bootstrap-popup">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -577,6 +577,10 @@
|
|||||||
Select Column
|
Select Column
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<div class="hidden">
|
||||||
|
<div id="popover-target"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="tablesorter bootstrap-popup">
|
<table class="tablesorter bootstrap-popup">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user