"popover"
Bootstrap 4.0.0 Snippet by MohamedAlaa

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Create your snippet's HTML, CSS and Javascript in the editor tabs</h2> </div> <div class="row"> <button class="btn btn-primary" data-toggle="popover" data-popover-target="#popover-content-1">Do Popover 1</button> <button class="btn btn-primary" data-toggle="popover" data-popover-target="#popover-content-2">Do Popover</button> <div id="popover-content-1" style="display: none">Content 1</div> <div id="popover-content-2" style="display: none">Content 2</div> </div> </div>
$(function() { $('[data-toggle="popover"]').each(function(i, obj) { var popover_target = $(this).data('popover-target'); $(this).popover({ html: true, trigger: 'focus', placement: 'right', content: function(obj) { return $(popover_target).html(); } }); }); });

Related: See More


Questions / Comments: