Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hello, dear users! Can you help me to sort out with the js code I wrote inside PB. On clicking button there will be apperance of a modal window. Does this js code “onclick” work if you add it inside pagebuilder code strips at the php file?
$output .= '<a href="#" onclick="document.getElementById("btn-1508746468").style.display="block"" id="btn-1508746468" class="sppb-btn sppb-btn-primary sppb-btn-rounded sp-tooltip" data-toggle="tooltip" data-placement="top" data-original-title="Кнопка временно не работает, приносим свои извенения. Для заказа, звоните: +7 (926) 962-42-21 | +7 (926) 493-51-99"><i class="fa fa-shopping-cart"></i>ОФОРМИТЬ ДОСТАВКУ</a>';
$output .= '<div id="btn-1508746468" class="w3-modal"> <div class="w3-modal-content w3-card-4"> <header class="w3-container w3-teal"> <span onclick="document.getElementById("btn-1508746468").style.display="none"" class="w3-button w3-display-topright">×</span> <h2>Modal Header</h2> </header> <div class="w3-container"> You have two options to close this modal: Click on the "x" or click anywhere outside of the modal! </div> <footer class="w3-container w3-teal"> Modal Footer </footer> </div> </div>';
Hi Olga,
I would add the provided code to a Custom HTML widget.