No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

couloir.js 887B

1234567891011121314151617181920212223
  1. // -------------- VARIABLES -------------//
  2. let lienCrypto = document.getElementById("button2");
  3. let body = document.getElementById("body");
  4. // -------------- FUNCTIONS -------------//
  5. function handleLienCryptoClicked() {
  6. lienCrypto.removeEventListener("click", handleLienCryptoClicked);
  7. let audioPas = document.createElement("audio");
  8. audioPas.setAttribute("preload", "auto");
  9. audioPas.setAttribute("autoplay", true);
  10. audioPas.setAttribute("src", "../Sounds/pas_insaide.mp3");
  11. audioPas.style.cssText = "z-index: -1; opacity: 0;";
  12. body.appendChild(audioPas);
  13. body.style.cssText = "animation : fondu 5s forwards"
  14. setTimeout(() => {
  15. lienCrypto.setAttribute("href", "./crypto_seul.html");
  16. lienCrypto.click();
  17. }, 5000);
  18. }
  19. // --------------- EVENTS ---------------//
  20. lienCrypto.addEventListener("click", handleLienCryptoClicked);