Bootstrap .popover() 'show' & 'destroy' not working properly

后端 未结 6 2041
刺人心
刺人心 2021-02-12 21:44

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 ch

6条回答
  •  感动是毒
    2021-02-12 22:49

    My temporary solution look like this:

    I'm using:

    $('.popover').remove();
    

    to remove popovers

    and

    $('body').on('click' , '[rel="popover"]' , function(e){
        e.stopPropagation();
    
        var i = $(this);
        var thisPopover = $('.popoverClose').filter('[data-info-id="' +i.data('info-id')+ '"]').closest('.popover');        
        if( thisPopover.is(':visible') ){
            $('.popover').remove();
        }
        else{
            $(this).popover('show');
        }
    });
    

    to toggle popovers

提交回复
热议问题