Answers for "tablet w3schools"

3

javascript tabs example

const showHideAll =(list)=>{
  for(var i = 0; i < list.length; i++){
      list[i].classList.remove('show');
      list[i].classList.add('hide'); // depending on what you're doing
  }
}

window.onload = function() {
  let innerDiv = document.getElementsByClassName("inner-description");
  let clicked = document.querySelectorAll('.show-hide-description');
  clicked.forEach((item, i) => {
    let clickedId = item.id;
    document.querySelector(`#${clickedId}`).addEventListener('click',()=>{
      let clickedIdDescription = document.getElementById(`${clickedId}-description`);
      if(clickedIdDescription.classList.contains('show')){
        showHideAll(innerDiv)
      } else {
        showHideAll(innerDiv)
        clickedIdDescription.classList.remove('hide');
        clickedIdDescription.classList.add('show');
      }
    })
  });
}
Posted by: Guest on August-06-2020
-1

tabletopia

Enemy of My Enemy is a tower defence style game in which you must defend your outpost from invaders. Each player will compete to be the last outpost standing by both defending their base and attacking those of the other players.
Posted by: Guest on November-09-2020

Browse Popular Code Answers by Language