{"id":24957,"date":"2024-08-30T22:02:03","date_gmt":"2024-08-30T20:02:03","guid":{"rendered":"https:\/\/bookingtjeneste.no\/?page_id=24957"},"modified":"2024-10-14T12:20:13","modified_gmt":"2024-10-14T10:20:13","slug":"demo-popup-modal","status":"publish","type":"page","link":"https:\/\/bookingtjeneste.no\/en\/demo-popup-modal\/","title":{"rendered":"Demo popup modal"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"24957\" class=\"elementor elementor-24957\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b650865 e-flex e-con-boxed e-con e-parent\" data-id=\"b650865\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;pix_scale_in&quot;:&quot;none&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-fcc5948 elementor-widget elementor-widget-html\" data-id=\"fcc5948\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div style=\"display: flex; justify-content: center;\">\n    <button class=\"btn btn-primary\" onclick=\"openBookNowIframe();\" style=\"background-color: #333331; color: #fff; font-size: 18px; padding: 10px 20px; border: none; cursor: pointer; border-radius: 5px; transition: background-color 0.3s, transform 0.2s; font-weight: normal;\">\n        Book now\n    <\/button>\n<\/div>\n\n<style>\n    .btn-primary:hover {\n        background-color: #4120EA!important;\n    }\n\n    #bookNowIframeContainer {\n        position: fixed;\n        top: 0;\n        left: 0;\n        width: 100%;\n        height: 100%;\n        z-index: 10000;\n        background: rgba(0, 0, 0, 0.7);\n        display: flex;\n        justify-content: center;\n        align-items: center;\n    }\n\n    #bookNowIframe {\n        width: 100%;\n        max-width: 1001px;\n        border: none;\n    }\n\n    @media (min-width: 1001px) {\n        #bookNowIframe {\n            height: 90vh;\n        }\n    }\n<\/style>\n<script>\n    function openBookNowIframe() {\n        var iframeContainer = document.createElement('div');\n        iframeContainer.id = 'bookNowIframeContainer';\n\n        var iframe = document.createElement('iframe');\n        iframe.id = 'bookNowIframe';\n        iframe.src = \"https:\/\/bookingtjeneste.no\/Demo?iframe=1\"; \/\/ Bruker dynamisk URL for iFrame\n\n        iframeContainer.appendChild(iframe);\n\n        \/\/ Add image as a close button to close the popup\n        var closeButton = document.createElement('img');\n        closeButton.src = \"https:\/\/bookingtjeneste.no\/wp-content\/plugins\/Booknetic-saas-Popup-Modal\/images\/x.png\"; \/\/ Bruker riktig dynamisk kilde for lukkebildet\n        closeButton.style.position = 'absolute';\n        closeButton.style.top = '10px'; \n        closeButton.style.right = '10px'; \n        closeButton.style.width = '35px'; \n        closeButton.style.height = '35px'; \n        closeButton.style.cursor = 'pointer';\n\n        closeButton.onclick = function() {\n            document.body.removeChild(iframeContainer);\n        };\n\n        iframeContainer.appendChild(closeButton);\n\n        document.body.appendChild(iframeContainer);\n\n        if (window.innerWidth >= 1001) {\n            iframe.style.height = '90vh';\n        } else {\n            iframe.style.height = '100%';\n        }\n    }\n<\/script>\n        \t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Book now<\/p>","protected":false},"author":1,"featured_media":24547,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-24957","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/bookingtjeneste.no\/en\/wp-json\/wp\/v2\/pages\/24957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bookingtjeneste.no\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bookingtjeneste.no\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bookingtjeneste.no\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bookingtjeneste.no\/en\/wp-json\/wp\/v2\/comments?post=24957"}],"version-history":[{"count":0,"href":"https:\/\/bookingtjeneste.no\/en\/wp-json\/wp\/v2\/pages\/24957\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bookingtjeneste.no\/en\/wp-json\/wp\/v2\/media\/24547"}],"wp:attachment":[{"href":"https:\/\/bookingtjeneste.no\/en\/wp-json\/wp\/v2\/media?parent=24957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}