This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="question-container" | |
| <ul> | |
| <li class="question"> | |
| <a href="#"> | |
| <p> | |
| How many team members can I invite? | |
| </p> | |
| <img src="./images/icon-arrow-down.svg" alt="arrow"> | |
| </a> | |
| <ul class="answer"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Default view */ | |
| .question .answer { | |
| height: 0; | |
| visibility: hidden; | |
| opacity: 0; | |
| transition: all .3s ease-in-out; | |
| } | |
| .question img { | |
| transition: all .3s ease-in-out; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const questions = document.querySelectorAll('.question'); | |
| questions.forEach(question => { | |
| question.addEventListener('click', () => { | |
| questions.forEach(item => { | |
| if(item !== question) { | |
| item.classList.remove('selected'); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const circleLinks = document.getElementById('circle-btns'); | |
| export const slider = () => { | |
| circleLinks.addEventListener('click', e => { | |
| const target = e.target; | |
| const circleArr = Array.from(circleLinks.children); | |
| circleArr.forEach(node => { | |
| if(target !== node.classList.contains('active-btn')) { | |
| node.classList.remove('active-btn'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const grassImage = document.getElementById('grassland'); | |
| const mountainsImage = document.getElementById('mountains'); | |
| const skyImage = document.getElementById('sky'); | |
| const heroData = document.getElementById('hero-data'); | |
| window.addEventListener('scroll', () => { | |
| let scrollPosition = window.scrollY; | |
| grassImage.style.transform = `translateY(${-scrollPosition * 0.02}%)`; |