Advertisement
oscarviedma

Integrar locomotive.js con divi

Jun 4th, 2021 (edited)
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/locomotive-scroll@3.5.4/dist/locomotive-scroll.css">
  2. <script src="https://cdn.jsdelivr.net/npm/locomotive-scroll@4.1.1/dist/locomotive-scroll.min.js"></script>
  3.  
  4. <script>
  5. jQuery(document).ready(function($){
  6.  
  7. $( ".et_builder_inner_content" ).attr( "data-scroll-container", "" );
  8. $( ".et_pb_section" ).attr( "data-scroll-section", "" );
  9.  
  10. $( ".data-scroll" ).attr( "data-scroll", "" );
  11.  
  12. // Animar elementos
  13. $(".nombre-clase").attr( {
  14. "data-scroll-direction":"vertical",
  15. "data-scroll-speed":"1"
  16. } );
  17.  
  18. });
  19. </script>
  20.  
  21. <script>
  22. jQuery(document).ready(function($){
  23. const scroll = new LocomotiveScroll({
  24. el: document.querySelector('[data-scroll-container]'),
  25. smooth: true,
  26. smartphone: {
  27. smooth: true
  28. },
  29. tablet: {
  30. smooth: true
  31. },
  32. });
  33. });
  34. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement