js bootstrap 4 popover with different data code example
Example 1: bootstrap popover on dynamic element
var popOverSettings = {
placement: 'bottom',
container: 'body',
html: true,
selector: '[rel="popover"]', //Sepcify the selector here
content: function () {
return $('#popover-content').html();
}
}
$('body').popover(popOverSettings);
Example 2: popover bootstrap 4
<script>
$(document).ready(function(){
$('[data-toggle="popover"]').popover({
html: true
});
});
</script>
Example 3: bootstrap 4 popover content from div
.popover-html ul {
list-style: none;
margin: 0;
padding: 0;
}
.popover-html ul li {
display: inline-block;
white-space: nowrap;
width: 33%;
}
.popover-html ul li + li {
padding-left: 5px;
}