Advertisement
oscarviedma

Código para integrar slick.js con divi: Tutorial Slider Horizontal

Jul 15th, 2021
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
  2.  
  3. <script>
  4. jQuery(function($){
  5. $( ".slider-wrap" ).wrapAll( "<div class='slider-for' />");
  6. });
  7. </script>
  8.  
  9. <script>
  10. jQuery(function($){
  11. $('.slider-for').slick({
  12. slidesToShow: 1,
  13. slidesToScroll: 1,
  14. arrows: false,
  15. fade: true,
  16. asNavFor: '.slider-nav'
  17. });
  18. $('.slider-nav').slick({
  19. slidesToShow: 4,
  20. slidesToScroll: 1,
  21. asNavFor: '.slider-for',
  22. arrows: true,
  23. dots: false,
  24. centerMode: true,
  25. focusOnSelect: true,
  26. autoplay: true,
  27. autoplaySpeed: 2000,
  28. responsive: [
  29. {
  30. breakpoint: 980,
  31. settings: {
  32. slidesToShow: 3,
  33. slidesToScroll: 1
  34. }
  35. },
  36. {
  37. breakpoint: 768,
  38. settings: {
  39. slidesToShow: 2,
  40. slidesToScroll: 1
  41. }
  42. }
  43. ]
  44. });
  45. });
  46. </script>
  47.  
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement