<!doctype html>
<
html
lang
=
"en"
>
<
head
>
<
link
href
=
rel
=
"stylesheet"
>
<
script
src
=
</
script
>
<
script
src
=
</
script
>
</
head
>
<
body
>
<
h1
class
=
"m-4 text-success"
>
GeeksforGeeks
</
h1
>
<
h4
class
=
"ms-4"
>
Bootstrap 5 Popovers hide() Method
</
h4
>
<
div
class
=
"container mt-4 p-4"
>
<
button
type
=
"button"
class
=
"btn btn-primary ms-3"
id
=
"rightPop"
data-bs-container
=
"body"
data-bs-toggle
=
"popover"
data-bs-placement
=
"right"
data-bs-content
=
"This is a popover placed at the right."
>
Right Popover
</
button
>
<
button
type
=
"button"
class
=
"btn btn-primary ms-5"
id
=
"bottomPop"
data-bs-container
=
"body"
data-bs-toggle
=
"popover"
data-bs-placement
=
"bottom"
data-bs-content
=
"This is a popover placed at the bottom."
>
Bottom Popover
</
button
>
</
div
>
<
div
class
=
"container mt-4 p-4"
>
<
button
type
=
"button"
class
=
"btn btn-success"
id
=
"showBtn_1"
>
Show right Popover
</
button
>
<
button
type
=
"button"
class
=
"btn btn-success ms-2"
id
=
"showBtn_2"
>
Show bottom Popover
</
button
>
</
div
>
<
div
class
=
"container mt-4 p-4"
>
<
button
type
=
"button"
class
=
"btn btn-danger"
id
=
"hideBtn_1"
>
Hide right Popover
</
button
>
<
button
type
=
"button"
class
=
"btn btn-danger ms-3"
id
=
"hideBtn_2"
>
Hide bottom Popover
</
button
>
</
div
>
<
script
>
$(document).ready(function () {
$("#showBtn_1").click(function () {
$("#rightPop").popover("show");
});
$("#showBtn_2").click(function () {
$("#bottomPop").popover("show");
});
$("#hideBtn_1").click(function () {
$("#rightPop").popover("hide");
});
$("#hideBtn_2").click(function () {
$("#bottomPop").popover("hide");
});
});
</
script
>
</
body
>
</
html
>