Skip to content

Instantly share code, notes, and snippets.

@carlosonweb
Created October 2, 2017 07:26
Show Gist options
  • Save carlosonweb/15bbbac6174e8a20ce20ec76ead48578 to your computer and use it in GitHub Desktop.
Save carlosonweb/15bbbac6174e8a20ce20ec76ead48578 to your computer and use it in GitHub Desktop.
Make the Beaver Builder's Content Slider Start Playing in Random Slide Number
//
// Content Slider ID = "bbcw-content-slider"
//
jQuery(document).ready(function($){
var $slider = $('#bbcw-content-slider .fl-content-slider-wrapper').data('bxSlider')
var 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