File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/mangozzz.com/testimonial.js
Back
const reviewWrap = document.getElementById("reviewWrap"); const leftArrow = document.getElementById("leftArrow"); const rightArrow = document.getElementById("rightArrow"); const imgDiv = document.getElementById("imgDiv"); const personName = document.getElementById("personName"); const profession = document.getElementById("profession"); const description = document.getElementById("description"); const surpriseMeBtn = document.getElementById("surpriseMeBtn"); const chicken = document.querySelector(".chicken"); let isChickenVisible; let people = [ { photo: 'url("images/testi.png")', name: "Ananya Mohite", description: "Mangozzz Magical World truly lives up to its name! The entire place is surrounded by nature, making it a perfect escape from the chaos of daily life. The atmosphere is so refreshing—you can feel the calmness as soon as you arrive. The food was absolutely delicious, with a variety of options. The staff was incredibly helpful and made our stay even more comfortable and memorable. What stood out the most was the stunning scenery, especially from the riverside rooms. Waking up to that peaceful view was a beautiful experience in itself." }, { photo: "url('images/testi.png')", name: "sneha gaikwad", description: "Must visit for a weekend getaway!!! It's just 15 mins from Karjat station and 1.5 hrs away from Mumbai thanks to the Atal setu.... The property is very well maintained.... It's clean and green 💚 river side cottages had a spectacular view.... Overall it's perfect for a weekend trip with friends or family." }, { photo: "url('images/testi.png')", name: "Siddharth Sen", description: "I recently stayed at Mangozzz Magical World and had a wonderful experience. The resort was very affordable, and the cottages were clean and well-maintained. We chose a pool-facing cottage, and the room service was exceptional. The food was delicious, and the staff recommended some amazing dishes. The ambience was serene, surrounded by nature, with plenty of activities like badminton and darts.Overall, it was a perfect getaway from the city. Highly recommend!" }, { photo: "url('images/testi.png')", name: "priya kolhekar", description: "This is one of the best resorts we have ever visited! The prices are affordable, and the food is delicious. The rooms are clean and well-maintained, with the riverside rooms offering the best views. The rain dance and swimming pool add to the fun activities available. We were highly satisfied with the service and would definitely recommend this place to others." } ]; imgDiv.style.backgroundImage = people[0].photo; personName.innerText = people[0].name; profession.innerText = people[0].profession; description.innerText = people[0].description; let currentPerson = 0; //Select the side where you want to slide function slide(whichSide, personNumber) { let reviewWrapWidth = reviewWrap.offsetWidth + "px"; let descriptionHeight = description.offsetHeight + "px"; //(+ or -) let side1symbol = whichSide === "left" ? "" : "-"; let side2symbol = whichSide === "left" ? "-" : ""; let tl = gsap.timeline(); if (isChickenVisible) { tl.to(chicken, { duration: 0.4, opacity: 0 }); } tl.to(reviewWrap, { duration: 0.4, opacity: 0, translateX: `${side1symbol + reviewWrapWidth}` }); tl.to(reviewWrap, { duration: 0, translateX: `${side2symbol + reviewWrapWidth}` }); setTimeout(() => { imgDiv.style.backgroundImage = people[personNumber].photo; }, 400); setTimeout(() => { description.style.height = descriptionHeight; }, 400); setTimeout(() => { personName.innerText = people[personNumber].name; }, 400); setTimeout(() => { profession.innerText = people[personNumber].profession; }, 400); setTimeout(() => { description.innerText = people[personNumber].description; }, 400); tl.to(reviewWrap, { duration: 0.4, opacity: 1, translateX: 0 }); if (isChickenVisible) { tl.to(chicken, { duration: 0.4, opacity: 1 }); } } function setNextCardLeft() { if (currentPerson === 3) { currentPerson = 0; slide("left", currentPerson); } else { currentPerson++; } slide("left", currentPerson); } function setNextCardRight() { if (currentPerson === 0) { currentPerson = 3; slide("right", currentPerson); } else { currentPerson--; } slide("right", currentPerson); } leftArrow.addEventListener("click", setNextCardLeft); rightArrow.addEventListener("click", setNextCardRight); surpriseMeBtn.addEventListener("click", () => { if (chicken.style.opacity === "0") { chicken.style.opacity = "1"; imgDiv.classList.add("move-head"); surpriseMeBtn.innerText = "Remove "; surpriseMeBtn.classList.remove("surprise-me-btn"); surpriseMeBtn.classList.add("hide-chicken-btn"); isChickenVisible = false; } else if (chicken.style.opacity === "1") { chicken.style.opacity = "0"; imgDiv.classList.remove("move-head"); surpriseMeBtn.innerText = "Surprise me"; surpriseMeBtn.classList.add("surprise-me-btn"); surpriseMeBtn.classList.remove("hide-chicken-btn"); isChickenVisible = false; } }); window.addEventListener("resize", () => { description.style.height = "100%"; });
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings