Всем привет! Не могу понять как реализовать такой слайдер
https://www.pinkspage.com/home/
сейчас все работает коряво на тачпаде, вот основная страница
lipskerov.fininvest.kz
вот код
var photo = document.getElementById('photo');
var books = document.getElementById('books');
var first1 = document.getElementById('first-first');
var text = document.getElementById('text');
var critics = document.getElementById('critics');
var first2 = document.getElementById('second-first');
var audio = document.getElementById('audio');
var blog = document.getElementById('blog');
var first3 = document.getElementById('third-first');
var count = 0;
document.onwheel = function(){
count++;
console.log(count);
if(first1.style.width=="100%" && count <=6){
books.style.width="100%";
first1.style.width="0%";
text.style.opacity = "1";
first2.style.opacity ="0";
audio.style.height = "100%";
first3.style.height = "0";
}
if(books.style.width=="100%" && count>6 && count <=12)
{
whatfaze =2;
books.style.width="0%";
photo.style.width="100%";
text.style.opacity = "0";
critics.style.opacity ="1";
audio.style.height = "0";
blog.style.height = "100%";
}
if(photo.style.width=="100%" && count>12 && count <=18)
{
whatfaze =3;
photo.style.width="0%";
first1.style.width="100%";
first2.style.opacity = "1s";
critics.style.opacity ="0";
blog.style.height = "0";
first3.style.height = "100%";
}
document.addEventListener('touchmove',function(){
alert(1);
if(first1.style.width=="100%"){
books.style.width="100%";
first1.style.width="0%";
text.style.opacity = "1";
first2.style.opacity ="0";
audio.style.height = "100%";
first3.style.height = "0";
}
if(books.style.width=="100%")
{
whatfaze =2;
books.style.width="0%";
photo.style.width="100%";
text.style.opacity = "0";
critics.style.opacity ="1";
audio.style.height = "0";
blog.style.height = "100%";
}
if(photo.style.width=="100%")
{
whatfaze =3;
photo.style.width="0%";
first1.style.width="100%";
first2.style.opacity = "1s";
critics.style.opacity ="0";
blog.style.height = "0";
first3.style.height = "100%";
}
});
if(count >=18) {
count=0;
}
}