Sha256: 00e75bbbb5e2a6aa85f378368bbe130aea2f902595d6e57d8defc73d72de4e92

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

document.addEventListener("DOMContentLoaded", function() {
    let openButton = document.getElementsByClassName("open-button");
    openButton[0].addEventListener("click", function(event) {
        let cover = document.getElementById("cover"),
            anchor = event.currentTarget;

        let listener = function() {
            window.location = anchor.href;
            cover.removeEventListener("animationend", listener);
        };
        cover.addEventListener("animationend", listener);
            
        event.preventDefault();
        cover.classList.add("slide");
    });
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arco-0.1.1 assets/js/cover-transitions.js