How to make Bootstrap popover Appear/Disappear on hover instead of click?

0 votes

Hii,

I'm building a website with Bootstrap's Popover and I can't figure out how to make the popover appear on hover instead of click.

  • All I want to do is have a popover appear when someone hovers over a link instead of clicking on it and for the popover to disappear when they move away. 
  • The documentation says it's possible using either the data attribute or jquery. I'd much rather do it with jquery since I have multiple popovers.
May 12 in JQuery by kartik
• 11,890 points
35 views

1 answer to this question.

0 votes

Hello @kartik,

Set the trigger option of the popover to hover instead of click, which is the default one.

This can be done using either data-* attributes in the markup:

<a id="popover" data-trigger="hover">Popover</a>

Or with an initialization option:

$("#popover").popover({ trigger: "hover" });

Thank You!!

answered May 12 by Niroj
• 23,950 points

Related Questions In JQuery

0 votes
1 answer

Twitter Bootstrap: How to see the state of a toggle button?

Hii @kartik, You can see what classes the ...READ MORE

answered May 12 in JQuery by Niroj
• 23,950 points
29 views
0 votes
1 answer

How to remove close button on the jQuery UI dialog?

Hii, I found this worked for me in the end ...READ MORE

answered May 12 in JQuery by Niroj
• 23,950 points
39 views
0 votes
1 answer

How to attach callback to jquery effect on dialog show?

Hello, Try out the code using jQuery Promise object: $("#dialog").dialog({ ...READ MORE

answered May 29 in JQuery by Niroj
• 23,950 points
25 views
0 votes
1 answer

Error: cannot call methods on dialog prior to initialization; attempted to call method 'close'

Hello @kartik, Looks like your buttons are not ...READ MORE

answered Apr 28 in JQuery by Niroj
• 23,950 points
58 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28 in JQuery by Niroj
• 23,950 points
211 views
+1 vote
1 answer

How to set cache false for getJSON in jQuery?

Hello @kartik, Your code just needs a trigger ...READ MORE

answered May 29 in JQuery by Niroj
• 23,950 points
18 views
0 votes
1 answer

From php returning JSON to JavaScript

Hii @kartik, You can use Simple JSON for PHP. ...READ MORE

answered 2 days ago in Java-Script by Niroj
• 23,950 points
16 views
0 votes
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18 in Laravel by Niroj
• 23,950 points
478 views
0 votes
1 answer

How to enable Bootstrap tooltip on disabled button?

Hii @kartik, You can wrap the disabled button ...READ MORE

answered May 12 in JQuery by Niroj
• 23,950 points
48 views
0 votes
1 answer

How to close all active bootstrap modals on session timeout?

Hello @kartik, Use the following code: $('.modal').modal('hide'); Also if you ...READ MORE

answered May 12 in JQuery by Niroj
• 23,950 points
57 views