custom.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. (function ($) {
  2. "use strict";
  3. $(".scroll-top").hide();
  4. $(window).on("scroll", function () {
  5. if ($(this).scrollTop() > 300) {
  6. $(".scroll-top").fadeIn();
  7. } else {
  8. $(".scroll-top").fadeOut();
  9. }
  10. });
  11. $(".scroll-top").on("click", function () {
  12. $("html, body").animate(
  13. {
  14. scrollTop: 0,
  15. },
  16. 700
  17. );
  18. });
  19. $(document).ready(function () {
  20. $(".select2").select2({
  21. theme: "bootstrap",
  22. });
  23. });
  24. new WOW().init();
  25. $(".video-button").magnificPopup({
  26. type: "iframe",
  27. gallery: {
  28. enabled: true,
  29. },
  30. });
  31. $(".magnific").magnificPopup({
  32. type: "image",
  33. gallery: {
  34. enabled: true,
  35. },
  36. });
  37. $(".slide-carousel").owlCarousel({
  38. loop: true,
  39. autoplay: true,
  40. autoplayHoverPause: true,
  41. margin: 0,
  42. mouseDrag: false,
  43. animateIn: "fadeIn",
  44. animateOut: "fadeOut",
  45. nav: true,
  46. navText: [
  47. "<i class='fas fa-long-arrow-alt-left'></i>",
  48. "<i class='fas fa-long-arrow-alt-right'></i>",
  49. ],
  50. responsive: {
  51. 0: {
  52. items: 1,
  53. },
  54. 600: {
  55. items: 1,
  56. },
  57. 1000: {
  58. items: 1,
  59. },
  60. },
  61. });
  62. $(".testimonial-carousel").owlCarousel({
  63. loop: true,
  64. autoplay: true,
  65. autoplayHoverPause: true,
  66. autoplaySpeed: 1500,
  67. smartSpeed: 1500,
  68. margin: 30,
  69. nav: false,
  70. animateIn: "fadeIn",
  71. animateOut: "fadeOut",
  72. navText: [
  73. "<i class='fa fa-caret-left'></i>",
  74. "<i class='fa fa-caret-right'></i>",
  75. ],
  76. responsive: {
  77. 0: {
  78. items: 1,
  79. dots: false,
  80. nav: true,
  81. },
  82. 768: {
  83. items: 1,
  84. dots: true,
  85. },
  86. 992: {
  87. items: 2,
  88. dots: true,
  89. },
  90. },
  91. });
  92. $(".room-detail-carousel").owlCarousel({
  93. loop: true,
  94. autoplay: false,
  95. autoplayHoverPause: true,
  96. margin: 0,
  97. mouseDrag: false,
  98. animateIn: "fadeIn",
  99. animateOut: "fadeOut",
  100. nav: true,
  101. navText: [
  102. "<i class='fa fa-angle-left'></i>",
  103. "<i class='fa fa-angle-right'></i>",
  104. ],
  105. responsive: {
  106. 0: {
  107. items: 1,
  108. },
  109. 600: {
  110. items: 1,
  111. },
  112. 1000: {
  113. items: 1,
  114. },
  115. },
  116. });
  117. jQuery(".mean-menu").meanmenu({
  118. meanScreenWidth: "991",
  119. });
  120. $(".datepicker").datepicker({
  121. format: "yyyy-mm-dd",
  122. todayHighlight: true
  123. });
  124. $('.counter').counterUp();
  125. })(jQuery);