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, 2020 in JQuery by kartik
• 37,490 points
516 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, 2020 by Niroj
• 82,680 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, 2020 in JQuery by Niroj
• 82,680 points
331 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, 2020 in JQuery by Niroj
• 82,680 points
1,323 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, 2020 in JQuery by Niroj
• 82,680 points
307 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, 2020 in JQuery by Niroj
• 82,680 points
75 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, 2020 in JQuery by Niroj
• 82,680 points
8,262 views
+1 vote
2 answers

How to set cache false for getJSON in jQuery?

You can't pass any configuration parameters to ...READ MORE

answered Oct 7, 2020 in JQuery by Amit
• 140 points
518 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, 2020 in Java-Script by Niroj
• 82,680 points
201 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, 2020 in PHP by Niroj
• 82,680 points
117 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, 2020 in JQuery by Niroj
• 82,680 points
1,821 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, 2020 in JQuery by Niroj
• 82,680 points
1,998 views