// sticky navbar window.addEventListener('scroll', function(){ var header = document.querySelector('.main-nav'); header.classList.toggle("sticky", window.scrollY > 100); }) // preparation section carousel var preparation = $('#preparation-carousel'); preparation.owlCarousel({ loop:true, margin:10, nav:false, dots: false, responsive:{ 0:{ items:1 }, 768:{ items:2 }, 1000:{ items:3 } } }); // Go to the next item $('.preparation-next').click(function() { preparation.trigger('next.owl.carousel'); }) // Go to the previous item $('.preparation-prev').click(function() { preparation.trigger('prev.owl.carousel', [300]); }) // blog section carousel var blog = $('#blog-carousel'); blog.owlCarousel({ loop:true, margin:10, nav:false, dots: false, responsive:{ 0:{ items:1 }, 600:{ items:2 }, 1000:{ items:4 } } }); // Go to the next item $('.owl-next').click(function() { blog.trigger('next.owl.carousel'); }) // Go to the previous item $('.owl-prev').click(function() { blog.trigger('prev.owl.carousel', [300]); }) // current news section carousel var currentNews = $('#current-news-carousel'); currentNews.owlCarousel({ loop:true, margin:10, nav:false, dots: false, responsive:{ 0:{ items:1 }, 600:{ items:2 }, 1000:{ items:4 } } }); // Go to the next item $('.current-next').click(function() { currentNews.trigger('next.owl.carousel'); }) // Go to the previous item $('.current-prev').click(function() { currentNews.trigger('prev.owl.carousel', [300]); }) // word of the day section carousel var wordOfDay = $('#wordOfDay-carousel'); wordOfDay.owlCarousel({ loop:true, items: 1, margin:10, nav:false, dots: false, }); // Go to the next item $('.word-next').click(function() { wordOfDay.trigger('next.owl.carousel'); }) // Go to the previous item $('.word-prev').click(function() { wordOfDay.trigger('prev.owl.carousel', [300]); })