carousel.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. (function($) {
  2. "use strict";
  3. /*---Owl-carousel----*/
  4. /*--- Owl-carousel-icons ---*/
  5. var owl = $('.owl-carousel-icons2');
  6. owl.owlCarousel({
  7. loop: true,
  8. rewind: false,
  9. margin: 25,
  10. animateIn: 'fadeInDowm',
  11. animateOut: 'fadeOutDown',
  12. autoplay: false,
  13. autoplayTimeout: 5000, // set value to change speed
  14. autoplayHoverPause: true,
  15. dots: false,
  16. nav: true,
  17. autoplay: true,
  18. responsiveClass: true,
  19. responsive: {
  20. 0: {
  21. items: 1,
  22. nav: true
  23. },
  24. 600: {
  25. items: 2,
  26. nav: true
  27. },
  28. 1300: {
  29. items: 4,
  30. nav: true
  31. }
  32. }
  33. })
  34. owlRtl()
  35. })(jQuery);
  36. function owlRtl() {
  37. "use strict";
  38. //RTL Owl-carousel
  39. var carousel = $('.rtl .owl-carousel');
  40. $.each(carousel, function(index, element) {
  41. var carouselData = $(element).data('owl.carousel');
  42. carouselData.settings.rtl = true; //don't know if both are necessary
  43. carouselData.options.rtl = true;
  44. $(element).trigger('refresh.owl.carousel');
  45. });
  46. }