Bootstrap > Popovers

Popover with hover in Bootstrap

How to get the popover using placing hover on element using bootstrap

Popover with hover

We can get the popover by placing the hover on element

<script type="text/javascript">
    $(document).ready(function () {
        $(".popover-pop a").popover({
            trigger: 'hover',
    <h2>Popover with hover</h2>
        <ul class="popover-pop list-inline">
            <li><a href="#" class="btn btn-warning" data-toggle="popover" title="Forums" data-content="Resolved Posts">DotNetFunda</a></li>
            <li><a href="#" class="btn btn-danger" data-toggle="popover"title="Step by step" data-content="Tutorials">TechFunda</a></li>
  • In the above code snippet we have defined to get the popover by placing the hover on the element 
  • In the body section of the HTML page we have value of class attribute as popover-pop in the ul element and we have defined the list values with anchor tag, we have two buttons with different values using data-toggle as popover, with title and data-content
  • In the head section of the HTML page we have script function, we have the function  $(".popover-pop a").popover({}) to call the popover in the body section and the function  trigger: 'hover', is used to get the popover when the mouse is placed on the element



 Views: 6807 | Post Order: 49

Write for us

Hosting Recommendations