class Carousel {
constructor(selector, options) {
this.$elem = document.querySelector(selector),
this.dots = options.dot
}
if( this.dots ) {
return ...
}
}
function getDefaultPropert(selector) {
let element = document.querySelector(selector);
let property = getComputedStyle(element).display;
...
return property;
}
document.querySelector('div')sytle.display = 'none';
...
window.addEventListener('scroll', () => {
let element = document.querySelector('div');
element.style.display = getDefaultPropert(selector);
});