John-sCC / jcc_frontend

Apache License 2.0
0 stars 0 forks source link

stats homepage styling #59

Closed Ishi-Singh closed 6 months ago

Ishi-Singh commented 6 months ago

Wireframe

image

How It Looks Like

image

This is probably not the best way to do it, but it works

  const singleGroupBtn = document.querySelector('.single-group');
  const multiGroupBtn = document.querySelector('.multi-group');
  singleGroupBtn.addEventListener('click', toggleActive);
  multiGroupBtn.addEventListener('click', toggleActive);
  function toggleActive(event) {
    singleGroupBtn.classList.remove('active');
    multiGroupBtn.classList.remove('active');
    event.currentTarget.classList.add('active');
  }