0
rated 0 times
[
2]
[
2]
/ answers: 1 / hits: 26529
/ 10 Years ago, tue, may 6, 2014, 12:00:00
So basically whenever I am loading a Bootstrap Popover with an empty content
option and inserting content into it dynamically, the popover loses its correct position.
For example:
$('td.chartSection').each(function () {
var $thisElem = $(this);
$thisElem.popover({
placement: 'top',
trigger: 'hover',
html: true,
container: $thisElem,
delay: {
hide: 500
},
content: ' '
});
});
//After popup is shown, run this event
$('td.chartSection').on('shown.bs.popover', function () {
var $largeChart = $(this).find('.popover .popover-content');
//Insert some dummy content
$largeChart.html(dfjhgqrgf regqef f wrgb wrbgqwtgtrg <br /> wfghjqerghqreg fbvwqbtwfbvfgb <br />efgwetrg);
});
My Question:
Is there a method that can recalculate the popovers position such as $('td.chartSection').popover('recalculate')
.
Or is there another way to re-position the popover without manually doing this with CSS styles?
More From » jquery