96
rated 0 times
[
99]
[
3]
/ answers: 1 / hits: 44073
/ 11 Years ago, fri, january 17, 2014, 12:00:00
When I use the bootstrap popover in 'manual' mode 'destroy' and 'hide' not working properly.
When I'm using hide and destroy, popover opacity changing to 0 but its not changing display to none, which resulting that the popover container cover the content bellow it.
Otherwise if I use 'toogle' mode it's working properly.
My code:
$('[rel=popover]').popover({
html: true,
placement: 'auto',
container: 'body',
trigger: 'manual'
});
$('body').on('click' , '[rel=popover]' , function(e){
e.stopPropagation();
$(this).popover('toggle');
});
$('body').on('click' , '.popoverClose' , function(e){
e.stopPropagation();
var i = $(this);
$('.inputInfo').filter('[data-info-id=' +i.data('info-id')+ ']').popover('hide');
});
// new code
$('body').on('click', function(){
$('[rel=popover]').popover('hide');
});
More From » jquery