mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Merge pull request #935 from Herst/master
Docs: improve bootstrap example in column selector docs
This commit is contained in:
commit
c97b40c1b4
@ -83,9 +83,6 @@
|
||||
#popover-target input {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.popover {
|
||||
margin-top: -65px; /* adjust popover position */
|
||||
}
|
||||
</style>
|
||||
|
||||
<script id="js">$(function() {
|
||||
@ -133,17 +130,6 @@
|
||||
});
|
||||
|
||||
/*** 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
|
||||
// note: no container is defined!
|
||||
@ -152,6 +138,16 @@
|
||||
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>
|
||||
</head>
|
||||
@ -502,6 +498,10 @@
|
||||
Select Column
|
||||
</button>
|
||||
|
||||
<div class="hidden">
|
||||
<div id="popover-target"></div>
|
||||
</div>
|
||||
|
||||
<table class="tablesorter bootstrap-popup">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -577,6 +577,10 @@
|
||||
Select Column
|
||||
</button>
|
||||
|
||||
<div class="hidden">
|
||||
<div id="popover-target"></div>
|
||||
</div>
|
||||
|
||||
<table class="tablesorter bootstrap-popup">
|
||||
<thead>
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user