123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- // 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]);
- })
|