soft genic
soft genic

Reputation: 2056

Hide twitter bootstrap popover

Following is my jquery code which i am using to display popover . What i wanna do is when a user click anywhere on the screen or on any <span id="close" class="pover"></span> then it hides the current opened popover and show a new popover on which the user clicks on.

As You can see below span which contains class="pover" are being poped up by the following jquery kindly let me know how can i hide the opened popup and display a new one accordingly

Currently, all the popover are getting displayed on click event.

$(document).ready(function() {
    $('.pover').each(function() {
        //$('#close').popover( "hide" );
        $(this).popover({
            title: $(this).attr('abc'),
            content: $(this).attr('data-content'),
            delay: "show",
            trigger: "click"
        });
    });
});​

Upvotes: 1

Views: 2958

Answers (1)

soft genic
soft genic

Reputation: 2056

Found this great solution:

Exactly what I am seeking to do.

https://github.com/lecar-red/bootstrapx-clickover

http://www.leecarmichael.com/bootstrapx-clickover/examples.html

Upvotes: 2

Related Questions