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
• 27,140 points
180 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
• 58,500 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
• 58,500 points
78 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
• 58,500 points
284 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
• 58,500 points
107 views
0 votes
1 answer

How to get the children of the $(this) selector?

Hello @kartik, The jQuery constructor accepts a 2nd ...READ MORE

answered Sep 10 in JQuery by Niroj
• 58,500 points
12 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
• 58,500 points
2,240 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
• 58,500 points
166 views
0 votes
1 answer

From php returning JSON to JavaScript

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

answered Jun 4 in Java-Script by Niroj
• 58,500 points
127 views
0 votes
1 answer

How can I compare two dates in PHP?

Hello @kartik, If all your dates are posterior ...READ MORE

answered Aug 27 in PHP by Niroj
• 58,500 points
57 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
• 58,500 points
624 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
• 58,500 points
588 views