{"id":4562,"date":"2025-03-31T18:12:12","date_gmt":"2025-03-31T18:12:12","guid":{"rendered":"https:\/\/kidneydiseaseclinic.net\/kdc\/modal-txt\/"},"modified":"2025-03-31T18:12:12","modified_gmt":"2025-03-31T18:12:12","slug":"modal-txt","status":"publish","type":"post","link":"https:\/\/kidneydiseaseclinic.net\/kdc\/modal-txt\/","title":{"rendered":"modal.txt"},"content":{"rendered":"<p>body {font-family: Arial, Helvetica, sans-serif;}<\/p>\n<p>\/* The Modal (background) *\/<br \/>\n.modal {<br \/>\n  display: none; \/* Hidden by default *\/<br \/>\n  position: fixed; \/* Stay in place *\/<br \/>\n  z-index: 1; \/* Sit on top *\/<br \/>\n  padding-top: 100px; \/* Location of the box *\/<br \/>\n  left: 0;<br \/>\n  top: 0;<br \/>\n  width: 100%; \/* Full width *\/<br \/>\n  height: 100%; \/* Full height *\/<br \/>\n  overflow: auto; \/* Enable scroll if needed *\/<br \/>\n  background-color: rgb(0,0,0); \/* Fallback color *\/<br \/>\n  background-color: rgba(0,0,0,0.4); \/* Black w\/ opacity *\/<br \/>\n}<\/p>\n<p>\/* Modal Content *\/<br \/>\n.modal-content {<br \/>\n  position: relative;<br \/>\n  background-color: #fefefe;<br \/>\n  margin: auto;<br \/>\n  padding: 0;<br \/>\n  border: 1px solid #888;<br \/>\n  width: 80%;<br \/>\n  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);<br \/>\n  -webkit-animation-name: animatetop;<br \/>\n  -webkit-animation-duration: 0.4s;<br \/>\n  animation-name: animatetop;<br \/>\n  animation-duration: 0.4s<br \/>\n}<\/p>\n<p>\/* Add Animation *\/<br \/>\n@-webkit-keyframes animatetop {<br \/>\n  from {top:-300px; opacity:0}<br \/>\n  to {top:0; opacity:1}<br \/>\n}<\/p>\n<p>@keyframes animatetop {<br \/>\n  from {top:-300px; opacity:0}<br \/>\n  to {top:0; opacity:1}<br \/>\n}<\/p>\n<p>\/* The Close Button *\/<br \/>\n.close {<br \/>\n  color: white;<br \/>\n  float: right;<br \/>\n  font-size: 28px;<br \/>\n  font-weight: bold;<br \/>\n}<\/p>\n<p>.close:hover,<br \/>\n.close:focus {<br \/>\n  color: #000;<br \/>\n  text-decoration: none;<br \/>\n  cursor: pointer;<br \/>\n}<\/p>\n<p>.modal-header {<br \/>\n  padding: 2px 16px;<br \/>\n  background-color: #5cb85c;<br \/>\n  color: white;<br \/>\n}<\/p>\n<p>.modal-body {padding: 2px 16px;}<\/p>\n<p>.modal-footer {<br \/>\n  padding: 2px 16px;<br \/>\n  background-color: #5cb85c;<br \/>\n  color: white;<br \/>\n}<\/p>\n<h2>Animated Modal with Header and Footer<\/h2>\n<p><!-- Trigger\/Open The Modal --><br \/>\n<button id=\"myBtn\">Open Modal1<\/button><br \/>\n<!-- The Modal --><\/p>\n<div id=\"myModal\" class=\"modal\">\n<p>  <!-- Modal content --><\/p>\n<div class=\"modal-content\">\n<div class=\"modal-header\">\n      <span class=\"close\">&times;<\/span><\/p>\n<h2>Modal Header<\/h2>\n<\/p><\/div>\n<div class=\"modal-body\">\n<h1>Ampicillin<\/h1>\n<p><H3>  CLINICAL USE <\/H3><br \/>\nAntibacterial agent<br \/>\n<H3> DOSE IN NORMAL RENAL FUNCTION  <\/H3><br \/>\nOral: 250 mg \u2013 1 g every 6 hours<br \/>\nIM\/IV: 500 mg \u2013 2 g every 4\u20136 hours<\/p><\/div>\n<div class=\"modal-footer\">\n<h3>Modal Footer<\/h3>\n<div class=\"w3-container w3-light-grey w3-padding\">\n   <button class=\"w3-button w3-right w3-white w3-border\">Close<\/button>\n    <\/div>\n<\/p><\/div>\n<\/div>\n<p>\/\/ Get the modal<br \/>\nvar modal = document.getElementById(&#8220;myModal&#8221;);<\/p>\n<p>\/\/ Get the button that opens the modal<br \/>\nvar btn = document.getElementById(&#8220;myBtn&#8221;);<\/p>\n<p>\/\/ Get the <span> element that closes the modal<br \/>\nvar span = document.getElementsByClassName(&#8220;close&#8221;)[0];<\/p>\n<p>\/\/ When the user clicks the button, open the modal<br \/>\nbtn.onclick = function() {<br \/>\n  modal.style.display = &#8220;block&#8221;;<br \/>\n}<\/p>\n<p>\/\/ When the user clicks on <span> (x), close the modal<br \/>\nspan.onclick = function() {<br \/>\n  modal.style.display = &#8220;none&#8221;;<br \/>\n}<\/p>\n<p>\/\/ When the user clicks anywhere outside of the modal, close it<br \/>\nwindow.onclick = function(event) {<br \/>\n  if (event.target == modal) {<br \/>\n    modal.style.display = &#8220;none&#8221;;<br \/>\n  }<br \/>\n}<\/p>\n<\/div>\n<\/div>\n<h2>Animated Modal with Header and Footer<\/h2>\n<p><!-- Trigger\/Open The Modal --><br \/>\n<button id=\"myBtn\">Open Modal1<\/button><br \/>\n<!-- The Modal --><\/p>\n<div id=\"myModal\" class=\"modal\">\n<p>  <!-- Modal content --><\/p>\n<div class=\"modal-content\">\n<div class=\"modal-header\">\n      <span class=\"close\">&times;<\/span><\/p>\n<h2>Modal Header<\/h2>\n<\/p><\/div>\n<div class=\"modal-body\">\n<h1>Ampicillin<\/h1>\n<p><H3>  CLINICAL USE <\/H3><br \/>\nAntibacterial agent<br \/>\n<H3> DOSE IN NORMAL RENAL FUNCTION  <\/H3><br \/>\nOral: 250 mg \u2013 1 g every 6 hours<br \/>\nIM\/IV: 500 mg \u2013 2 g every 4\u20136 hours<\/p><\/div>\n<div class=\"modal-footer\">\n<h3>Modal Footer<\/h3>\n<div class=\"w3-container w3-light-grey w3-padding\">\n   <button class=\"w3-button w3-right w3-white w3-border\">Close<\/button>\n    <\/div>\n<\/p><\/div>\n<\/div>\n<p>\/\/ Get the modal<br \/>\nvar modal = document.getElementById(&#8220;myModal&#8221;);<\/p>\n<p>\/\/ Get the button that opens the modal<br \/>\nvar btn = document.getElementById(&#8220;myBtn&#8221;);<\/p>\n<p>\/\/ Get the <span> element that closes the modal<br \/>\nvar span = document.getElementsByClassName(&#8220;close&#8221;)[0];<\/p>\n<p>\/\/ When the user clicks the button, open the modal<br \/>\nbtn.onclick = function() {<br \/>\n  modal.style.display = &#8220;block&#8221;;<br \/>\n}<\/p>\n<p>\/\/ When the user clicks on <span> (x), close the modal<br \/>\nspan.onclick = function() {<br \/>\n  modal.style.display = &#8220;none&#8221;;<br \/>\n}<\/p>\n<p>\/\/ When the user clicks anywhere outside of the modal, close it<br \/>\nwindow.onclick = function(event) {<br \/>\n  if (event.target == modal) {<br \/>\n    modal.style.display = &#8220;none&#8221;;<br \/>\n  }<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>body {font-family: Arial, Helvetica, sans-serif;} \/* The Modal (background) *\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7],"class_list":["post-4562","post","type-post","status-publish","format-standard","hentry","category-blog","tag-post-by-auto-php"],"_links":{"self":[{"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/posts\/4562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/comments?post=4562"}],"version-history":[{"count":0,"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/posts\/4562\/revisions"}],"wp:attachment":[{"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/media?parent=4562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/categories?post=4562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kidneydiseaseclinic.net\/kdc\/wp-json\/wp\/v2\/tags?post=4562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}