Skip to content

Commit

Permalink
fixes the issue where if clicked the page would stop displaying info… (
Browse files Browse the repository at this point in the history
…#1147)

* fixes the issue where if clickeed the page would stop displaying information (like meetup events, and team meetings)

* fixed cute little carrot thing

* fixed function name

* fixed issue where desktop to mobile would leave accordions open.
  • Loading branch information
thatguyish authored Mar 3, 2021
1 parent 17ad0e8 commit d54d867
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions events/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,30 @@ <h2 class="event-title-1">
}

function showingDropDown() {
if(document.body.clientWidth<767){
this.classList.toggle("active");
let dropDown = this.nextElementSibling;

if (dropDown.style.display === "block") {
dropDown.style.display = "none";
} else {
dropDown.style.display = "block";
let dropDown = this.nextElementSibling;
if (dropDown.style.display === "block") {
dropDown.style.display = "none";
} else {
dropDown.style.display = "block";
}
}
}
window.addEventListener('resize',handleScreenResize)
function handleScreenResize(){
if(document.body.clientWidth>767){
const columns = document.querySelectorAll('.mobile-dropdown');
for(let column of columns){
column.style.display='block';
column.previousElementSibling.classList.remove('active');
}
}
else{
const columns = document.querySelectorAll('.mobile-dropdown');
for(let column of columns){
column.style.display='none';
}
}
}
</script>

0 comments on commit d54d867

Please sign in to comment.