Last active
January 17, 2019 08:20
-
-
Save carlosonweb/5048e78af84d4acd8fcb0ed64d9d95d3 to your computer and use it in GitHub Desktop.
Randomize Display of Beaver Builder Content Slider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
var $slider = $('#bbcw-content-slider .fl-content-slider-wrapper').data('bxSlider'), | |
slideCount = $slider.getSlideCount(); | |
$slider.goToSlide( Math.floor( Math.random() * slideCount ) ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A better solution, I guess, is to override the Content Slider module in the child theme directory. Here's the code to tweak:
https://www.screencast.com/t/Dy2oSLpMY