Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticky Popovers With Click Events #3500

Closed
nodesocket opened this issue May 16, 2012 · 3 comments
Closed

Sticky Popovers With Click Events #3500

nodesocket opened this issue May 16, 2012 · 3 comments

Comments

@nodesocket
Copy link

Is it possible to make a popover sticky, instead of hover binding, click to show, and it stays shown until the user clicks it again?

Thanks.

@richardp-au
Copy link

Set the trigger option to 'manual'. This is in the docs.

$(element).popover({
  trigger: 'manual'
})

or

<a rel="popover" title="I'm sticky!" data-trigger="manual">Click me</a>

@BigBlueHat
Copy link
Contributor

In addition to setting the trigger to 'manual' you also need to manage your own events to show/hide/toggle the popover. In addition to the code above, you'll need to do something like:

$(element).on('click', function() {
  $(this).popover('toggle');
});

Hope that helps.

@mdo
Copy link
Member

mdo commented May 28, 2012

Looks resolved. In the future, FYI, we'll be switching to click events for popovers. Until then, use the manual method.

@mdo mdo closed this as completed May 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants