Contact Information
- Phone: +375336699338
- E-mail: alekseyratkevich2001@gmail.com
- GitHub: AlekseyRatkevich
Carousel implementation on Javascript:
let offset = 0;
const sliderLine = document.querySelector('.slider-line');
document.querySelector('.slider-next').addEventListener('click', function() {
offset = offset + 256 //offset += 256;
if (offset > 768) {
offset = 0;
}
sliderLine.style.left = -offset + 'px';
});
document.querySelector('.slider-prev').addEventListener('click', function() {
offset = offset - 256 //offset -= 256;
if (offset < 0) {
offset = 768;
}
sliderLine.style.left = -offset + 'px';
});
4th year student of the Brest State Technical University . Faculty of Electronic Information Systems. I study in the specialty automated information processing systems (ASOI).