Skip to content

Instantly share code, notes, and snippets.

@carlosonweb
Last active January 17, 2019 08:20
Show Gist options
  • Save carlosonweb/5048e78af84d4acd8fcb0ed64d9d95d3 to your computer and use it in GitHub Desktop.
Save carlosonweb/5048e78af84d4acd8fcb0ed64d9d95d3 to your computer and use it in GitHub Desktop.
Randomize Display of Beaver Builder Content Slider
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 ) );
});
@mortensvendsen
Copy link

Hi carlosonweb,
I just have a question regarding your code piece. Where do I put the code on the website?

@carlosonweb
Copy link
Author

Hi @mortensvendsen,

Sorry, I only noticed your message now. The above code has to be placed on the page where the Content Slider is embedded. You may go to Tools > Layout CSS and JavaScript > JavaScript and embed it in that box.

@carlosonweb
Copy link
Author

carlosonweb commented Jan 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment