Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

popup in browser js

alert("Hello World!");
const result = prompt(message, default_value);
const result = confirm(message);
Comment

popup javascript

alert("This page uses cookies.");
Comment

make popup js

function popup(url, width, height) {
    var left = (screen.width/2)-(width/2);
    var top = (screen.height/2)-(height/2);
    return window.open(url, '', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+width+', height='+height+', top='+top+', left='+left);
}
Comment

javascript for pop up

<script> 
        function myFunction() {
            var r = confirm("OK to delete?");
            if ($r == false) {
                return false;
                } 
        }
    </script>
Comment

popup javascript

const show_popup = () => {
    const popup = $(".popup");
    const popupItems = document.querySelectorAll(".popup__item");
    const popupWrap = $(".popup__wrap");
    const popupOverlay = $(".popup__overlay");
    const popupClose = $(".popup__close");
    const btnsPopup = $$(".btn_popup");
  
    btnsPopup.forEach((btn) => {
        btn.addEventListener(["click"], () => {
            showPopup(btn.getAttribute("data-popup"));
        });
    });
  
    const showPopup = (index) => {
        popupItems.forEach((popup) => {
            popup.classList.remove("show_data");
        });
        popup.style.display = "block !important";
        $(`.popup__item[data-popup="${index}"]`).classList.add("show_data");
        popupWrap.classList = `popup__wrap popup__wrap--${index}`;
        setTimeout(() => {
            popup.classList.add("show_data");
        }, 10);
    };
    const closePopup = () => {
        popup.classList.remove("show_data");
        setTimeout(() => {
            popup.style.display = "";
            popupWrap.classList = `popup__wrap`;
        }, 500);
    };

    popupOverlay.addEventListener("click", closePopup);
    popupClose.addEventListener("click", closePopup);

};
show_popup();
Comment

PREVIOUS NEXT
Code Example
Javascript :: python restapi use post json 
Javascript :: set map to local storage javascript 
Javascript :: find all even numbers javascript 
Javascript :: Invalid prettier configuration file detected. See log for details. 
Javascript :: mongoose get elements that contain substring 
Javascript :: json remove &#34 
Javascript :: next auth 
Javascript :: json.parse 
Javascript :: create a javascript json object 
Javascript :: [Object] node js output 
Javascript :: how to use jquery plugins in angular 8 
Javascript :: chaining async await 
Javascript :: javascript .target 
Javascript :: convertir lista a Json en Java 
Javascript :: opposite of includes javascript 
Javascript :: js check if object key exists 
Javascript :: update karma jasmine to specific version 
Javascript :: odd and even in javascript 
Javascript :: cogo toast react 
Javascript :: js insert in array 
Javascript :: hammerjs 
Javascript :: javascript variables 
Javascript :: Delete - Cloudinary 
Javascript :: javascript create class 
Javascript :: jquery parse html 
Javascript :: angular chartjs align legend left 
Javascript :: swiper js 
Javascript :: how to fetch api in class component react 
Javascript :: get latlong of address in here map api javascript 
Javascript :: leaflet cdn 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =