Guest User

Untitled

a guest
Dec 28th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. add_action( 'wp_footer', function () { ?>
  2. <script>
  3.  
  4. jQuery.fn.randomize = function(selector){
  5. var $elems = selector ? $(this).find(selector) : jQuery(this).children(),
  6. $parents = $elems.parent();
  7.  
  8. $parents.each(function(){
  9. jQuery(this).children(selector).sort(function(){
  10. return Math.round(Math.random()) - 0.5;
  11. }).detach().appendTo(this);
  12. });
  13.  
  14. return this;
  15. };
  16.  
  17. jQuery("#testimonial-slider").owlCarousel({
  18. onInitialize : function(){
  19. jQuery("#testimonial-slider").randomize();
  20. },
  21. autoplay: true,
  22. autoplayTimeout: custom_data.consultstreet_testimonial_scroll_speed,
  23. autoplayHoverPause: true,
  24. smartSpeed: custom_data.consultstreet_testimonial_smart_speed,
  25. mouseDrag: custom_data.consultstreet_testimonial_mouse_drag_disabled,
  26.  
  27. loop:true, // loop is true up to 1199px screen.
  28. nav:false, // is true across all sizes
  29. margin:30, // margin 10px till 960 breakpoint
  30. autoHeight: true,
  31. responsiveClass:true, // Optional helper class. Add 'owl-reponsive-' + 'breakpoint' class to main element.
  32. //items: 1,
  33. dots: true,
  34. navText: ["<i class='fa fa-arrow-left'></i>","<i class='fa fa-arrow-right'></i>"],
  35.  
  36. responsive:{
  37. 100:{ items:1 },
  38. 480:{ items:1 },
  39. 768:{ items:2 },
  40. 1000:{ items:custom_data.consultstreet_testimonial_column_layout }
  41.  
  42. }
  43. });
  44.  
  45. </script>
  46. <?php } );
Add Comment
Please, Sign In to add comment