12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- // sticky navbar
- window.addEventListener('scroll', function(){
- var header = document.querySelector('#navbar');
- if(!header.classList.contains('show')) {
- header.classList.toggle("sticky", window.scrollY > 200);
- }
- })
- // mobile menu
- const navbar = document.querySelector('.navbar');
- const mobileToogleBtn = document.querySelector('.mobile-toggle-btn')
- if(navbar && mobileToogleBtn) {
- mobileToogleBtn.addEventListener('click', () => {
- navbar.classList.toggle('show')
- })
- }
- // mobile menu open
- // carousel
- // job preparation carousel
- var jobPreparationSlider = new Swiper('.jobPreparationSlider', {
- loop: true,
- slidesPerView: 3,
- spaceBetween: 24,
- loopedSlides: 1,
- breakpoints: {
- 0: {
- slidesPerView: 1,
-
- },
- 576: {
- slidesPerView: 2,
- },
- 993: {
- slidesPerView: 3,
-
- }
- },
- navigation: {
- nextEl: ".jobPreparationSlider-next",
- prevEl: ".jobPreparationSlider-prev",
- },
- });
- // our blog carousel
- var ourBlogSlider = new Swiper('.ourBlogSlider', {
- loop: true,
- slidesPerView: 3,
- spaceBetween: 24,
- loopedSlides: 1,
- breakpoints: {
- 0: {
- slidesPerView: 1,
-
- },
- 576: {
- slidesPerView: 2,
- },
- 993: {
- slidesPerView: 4,
-
- }
- },
- navigation: {
- nextEl: ".ourBlogSlider-next",
- prevEl: ".ourBlogSlider-prev",
- },
- });
- // on this day carousel
- var onThisDay = new Swiper('.onThisDay', {
- loop: true,
- slidesPerView: 1,
- spaceBetween: 40,
- loopedSlides: 1,
- navigation: {
- nextEl: ".onThisDay-next",
- prevEl: ".onThisDay-prev",
- },
- });
- // carousel end
|