let position = () => {
  let item = document.querySelector('.ac-left');
  let nav = document.querySelector('.custom-sdot');
  let hey2 = item.offsetWidth;
  let hey = hey2 + 'px';
  nav.style.left = `calc(${hey} + 4rem + 10px)`;
  console.log(nav.style.left);
};

let check = screen.width;

console.log(check);
if (check > 968) {
  position();
}
// position();
// if (document.querySelector('.custom-sdot')) {
//   window.onresize = function () {
//     location.reload();
//     if (check > 968) {
//       position();
//     } else {
//       nav.style.left = `50px`;
//     }
//   };
// }

window.onresize = function () {
  if (document.querySelector('.custom-sdot')) {
    if (check > 968) {
      location.reload();
      position();
    } else {
      nav.style.left = `50px`;
    }
  }
};
