Jquery Popover Example - Jquery

How to create Popovers using jquery?

Snippet Code

Rate this page :
  [ 0 votes]

Popover plugin is used to create a popup box which appears when the user clicks on the element. Here the popover is used to display the information about secondary content when it is clicked by user. The simple code to create popover is given below.

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('[data-toggle="popover"]').popover({ placement : 'top', }); }); </script> <style type="text/css"> a{margin: 150px 80px;} </style> <a href="#" class="btn btn-primary btn-lg" data-toggle="popover" tabindex="0" data-trigger="focus" title="This is another popup" data-content="Here comes your popup content."> Popover </a>


Ask Questions

Ask Question