I'm currently trying to reposition my popover depending on the position of the element that caused the popover.
The problem is that I initialize all my popovers with static positioning (see my example below). I want to change or set the position on the fly, directly, when I visit the element that caused the popover. Is it possible?
$(".timelineTour") .popover({ offset: 10, trigger: 'manual', animate: false, html: true, placement: 'bottom', template: '<div class="popover">' + '<div class="arrow"></div>' + '<div class="popover-inner">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"><p></p></div>' + '</div>' + '</div>' }).mouseenter(function(){ $(this).popover({ offset: 10, trigger: 'manual', animate: false, html: true, placement: 'right', template: '<div class="popover">' + '<div class="arrow"></div>' + '<div class="popover-inner">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"><p></p></div>' + '</div>' + '</div>' }); $(this).popover('show'); })
source share