Open AshhLoveCode opened 11 months ago
const wrapper = document.querySelector(".wrapper"); const question = document.querySelector(".question");
const gif document.querySelector(".gif");
const yesBtn = document.querySelector(".yes-btn");
const noBtn = document.querySelector(".no-btn");
yesBtn.addEventListener("click", () => {
question.innerHTML = "Aaaaa, I like you too";
"https://raw.githubusercontent.com/DzarelDeveloper/Img/main/gif.webp"; });
gif.src =
noBtn.addEventListener("mouseover", () => {
const noBtnRect noBtn.getBoundingClientRect();
const maxX = window.innerWidth noBtnRect.width;
const maxY = window.innerHeight noBtnRect.height;
const randomX = Math.floor(Math.random() * maxX);
const randomY = Math.floor(Math.random() * maxY);
noBtn.style.left = randomX + "px"; noBtn.style.top = randomY + "px";
});
const wrapper = document.querySelector(".wrapper"); const question = document.querySelector(".question");
const gif document.querySelector(".gif");
const yesBtn = document.querySelector(".yes-btn");
const noBtn = document.querySelector(".no-btn");
yesBtn.addEventListener("click", () => {
question.innerHTML = "Aaaaa, I like you too";
"https://raw.githubusercontent.com/DzarelDeveloper/Img/main/gif.webp"; });
gif.src =
noBtn.addEventListener("mouseover", () => {
const noBtnRect noBtn.getBoundingClientRect();
const maxX = window.innerWidth noBtnRect.width;
const maxY = window.innerHeight noBtnRect.height;
const randomX = Math.floor(Math.random() * maxX);
const randomY = Math.floor(Math.random() * maxY);
noBtn.style.left = randomX + "px"; noBtn.style.top = randomY + "px";
});