custom.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // responsive navbar for mobile menu
  2. const resBtn = document.getElementById("res-btn");
  3. const bodyTag = document.querySelector("body");
  4. resBtn.addEventListener('click', () => {
  5. bodyTag.classList.toggle("show-mobile-menu");
  6. })
  7. // responsive navbar for mobile menu end
  8. // course short description slider
  9. var swiper = new Swiper(".courses-short-desc", {
  10. spaceBetween: 30,
  11. loop: true,
  12. spaceBetween: 10,
  13. autoHeight: true,
  14. allowTouchMove: true,
  15. slidesPerView: 1,
  16. breakpoints: {
  17. 640: {
  18. slidesPerView: 2,
  19. spaceBetween: 10,
  20. },
  21. 768: {
  22. slidesPerView: 3,
  23. spaceBetween: 20,
  24. },
  25. 1024: {
  26. slidesPerView: 4,
  27. spaceBetween: 30,
  28. },
  29. },
  30. autoplay: {
  31. delay: 2500,
  32. disableOnInteraction: false,
  33. },
  34. });
  35. // course short description slider
  36. var swiper = new Swiper(".why-slider-1", {
  37. slidesPerView: "auto",
  38. centeredSlides: true,
  39. direction: "vertical",
  40. loop: true,
  41. autoplay: {
  42. delay: 2000,
  43. pauseOnMouseEnter: true,
  44. reverseDirection: true
  45. },
  46. spaceBetween: 20,
  47. });
  48. var swiper = new Swiper(".why-slider-2", {
  49. slidesPerView: "auto",
  50. centeredSlides: true,
  51. direction: "vertical",
  52. loop: true,
  53. autoplay: {
  54. delay: 2000,
  55. reverseDirection: false,
  56. pauseOnMouseEnter: true,
  57. },
  58. spaceBetween: 20,
  59. });
  60. // course short description slider
  61. // course short description slider
  62. var swiper = new Swiper(".new-course-slider", {
  63. spaceBetween: 30,
  64. loop: true,
  65. spaceBetween: 10,
  66. autoHeight: true,
  67. allowTouchMove: true,
  68. slidesPerView: 1,
  69. autoplay: {
  70. delay: 2500,
  71. pauseOnMouseEnter: true,
  72. },
  73. breakpoints: {
  74. 640: {
  75. slidesPerView: 2,
  76. spaceBetween: 10,
  77. },
  78. 768: {
  79. slidesPerView: 3,
  80. spaceBetween: 20,
  81. },
  82. 1024: {
  83. slidesPerView: 4,
  84. spaceBetween: 30,
  85. },
  86. },
  87. });