Submitted almost 2 years agoA solution to the Coding bootcamp testimonials slider challenge
Coding bootcamp testimonials slider with SCSS
accessibility, sass/scss
@MarieG41

Solution retrospective
What specific areas of your project would you like help with?
I'd like some help for the Javascript part. I can make the second slider appear and the first one disappear, but I can't make the first one appear again.
const prev = document.querySelector('.prev');
const next = document.querySelector('.next');
const testimonialOne = document.querySelector('.One');
const testimonialTwo =document.querySelector('.testimonial-2');
function nextTest() {
next.addEventListener('click', function() {
testimonialTwo.classList.remove('hidden');
testimonialOne.classList.add('hidden');
})
}
function PreviousTest() {
prev.addEventListener('click', function() {
testimonialTwo.classList.add('hidden');
testimonialOne.classlist.remove('hidden');
})
}
nextTest();
PreviousTest();
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on MarieG41's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord