Skip to content

Instantly share code, notes, and snippets.

@eglassman
Created July 28, 2014 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eglassman/453bc79a7e4707b6e0e7 to your computer and use it in GitHub Desktop.
Save eglassman/453bc79a7e4707b6e0e7 to your computer and use it in GitHub Desktop.
A popover configuration I like
<html>
<head>
<style>
body {padding:50px}
</style>
<!-- Latest compiled and minified CSS -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
<ul>
<li>
<div id="example" style="width:100">example</div></li>
</ul>
<script>$(document).ready(function() {
$("#example").popover({
placement: 'auto',
html: 'true',
title : '<span class="text-info"><strong>title</strong></span>'+
'<button type="button" id="close" class="close" onclick="$(&quot;#example&quot;).popover(&quot;hide&quot;);">&times;</button>',
content : 'test'
});
}); </script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment