Search code examples
javascripttwitter-bootstrapbootstrap-popover

How can I make Twitter Bootstrap Popover that always be open?


I want to make Twitter Bootstrap Popover that when document loaded, be open for ever. i see some solution but they show popover by click or hover!

There is my code:

$("#min-allowed-price .bar-label-shape").popover({
    offset: 10,
    trigger:'manual'
    });

Solution

  • One way is to show popover manually and then remove the click event handler for the popover link.

    $('.popover-visible-trigger')
        .popover('show')
        .off('click');

    See the working jsfiddle.

    The thing, though, is that maybe you don't need to do that. If you want the popover displayed at all times why not add it to markup?