JSFiddle - React, Tailwind, and code Playground
by a22177861
HTML
<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">
<button type="button" class="btn btn-warning" id="01" onclick="PopOver('01','001','Thank','You');">ClickMe!</button>
<button type="button" class="btn btn-warning" id="02" onclick="PopOver('02','002','Thank','You');">ClickMe!</button>
<button type="button" class="btn btn-warning" id="03" onclick="PopOver('03','003','Thank','You');">ClickMe!</button>
CSS
.btn {
margin-top: 20px;
margin-left: 20px;
}
JavaScript
function PopOver(id, mgr, Adate, Vdate) {
//$('[data-toggle="popover"]').popover('dispose');
var myObj = document.getElementById(id);
//myObj.focus();
myObj.setAttribute("data-container", "body");
myObj.setAttribute("data-toggle", "popover");
myObj.setAttribute("data-placement", "bottom");
myObj.setAttribute("data-html", "true");
//myObj.setAttribute("data-trigger", "focus");
myObj.setAttribute("title", "otherInfo");
myObj.setAttribute('data-content', "MGR:" + mgr + "<br />DATE1:" + Adate + "<br />DATE2:" + Vdate);
$("[data-toggle='popover']").popover('show');
}