Ingen beskrivning
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

main.js 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. (function ($) {
  2. "use strict";
  3. // Spinner
  4. var spinner = function () {
  5. setTimeout(function () {
  6. if ($('#spinner').length > 0) {
  7. $('#spinner').removeClass('show');
  8. }
  9. }, 1);
  10. };
  11. spinner(0);
  12. // Initiate the wowjs
  13. new WOW().init();
  14. // Sticky Navbar
  15. $(window).scroll(function () {
  16. if ($(this).scrollTop() > 45) {
  17. $('.nav-bar').addClass('sticky-top shadow-sm').css('top', '0px');
  18. } else {
  19. $('.nav-bar').removeClass('sticky-top shadow-sm').css('top', '-100px');
  20. }
  21. });
  22. // Header carousel
  23. $(".header-carousel").owlCarousel({
  24. animateOut: 'fadeOut',
  25. items: 1,
  26. margin: 0,
  27. stagePadding: 0,
  28. autoplay: true,
  29. smartSpeed: 500,
  30. dots: true,
  31. loop: true,
  32. nav : true,
  33. navText : [
  34. '<i class="bi bi-arrow-left"></i>',
  35. '<i class="bi bi-arrow-right"></i>'
  36. ],
  37. });
  38. // testimonial carousel
  39. $(".testimonial-carousel").owlCarousel({
  40. autoplay: true,
  41. smartSpeed: 1500,
  42. center: false,
  43. dots: false,
  44. loop: true,
  45. margin: 25,
  46. nav : true,
  47. navText : [
  48. '<i class="fa fa-arrow-right"></i>',
  49. '<i class="fa fa-arrow-left"></i>'
  50. ],
  51. responsiveClass: true,
  52. responsive: {
  53. 0:{
  54. items:1
  55. },
  56. 576:{
  57. items:1
  58. },
  59. 768:{
  60. items:2
  61. },
  62. 992:{
  63. items:2
  64. },
  65. 1200:{
  66. items:2
  67. }
  68. }
  69. });
  70. // Facts counter
  71. $('[data-toggle="counter-up"]').counterUp({
  72. delay: 5,
  73. time: 2000
  74. });
  75. // Back to top button
  76. $(window).scroll(function () {
  77. if ($(this).scrollTop() > 300) {
  78. $('.back-to-top').fadeIn('slow');
  79. } else {
  80. $('.back-to-top').fadeOut('slow');
  81. }
  82. });
  83. $('.back-to-top').click(function () {
  84. $('html, body').animate({scrollTop: 0}, 1500, 'easeInOutExpo');
  85. return false;
  86. });
  87. })(jQuery);