I have the carousel built in a “section” and I have a Main Box for the carousel. I then have each “Slide” within the Main Box (See screenshot). When published and previewed, it only shows the first “Slide” which fades away, then nothing else shows. Test page is here: http://beerwerkstrail.com/goodtimes/
Screen Shot 2020-08-06 at 4.25.09 PM|404x230
I am using the Auto Play Script Code (Inserted in before body end tag):
<script>
/*
Unbounce Community :: Tips & Scripts :: Carousel With A Box Widget
TS:0002-04-063
***********************
Do not remove this section. It helps our team track useage of external workarounds.
*/
// jQuery 2.2.4 requierd
// CDN link here - https://code.jquery.com/
$(function() {
// Add a box to the page and nest the elements inside (can include boxes with grouped content)
// The first element that is nested in the containing box will be what shows on page load
// Add ID of box containing elements.
var container = $("#lp-pom-box-362");
// Add the amount of time before the element switches. EX: 2000 = 2 seconds
var time = 2000;
// code to select and centre elements
container.children().css({
'top': '50%',
'left': '50%',
'transform': 'translate(-50%, -50%)'
});
var allEls = container.children().not(":eq(0)");
var notFirst = allEls.not(":eq(0)");
notFirst.css('display', 'none');
// Function to cycle through the elements in the containing box and show/hide them
function ShowEls(el, delay) {
$(el[0]).fadeIn(300)
.delay(delay)
.fadeOut(300)
.promise()
.done(function() {
var putBack = el.splice(0, 1);
if (el.length >= 1) {
ShowEls(el, delay);
allEls.push(putBack[0]);
}
});
}
ShowEls(allEls, time);
});
</script>
As well as the JQuery (Insert in the Head) I’ve tried both this script and the newer version script:
<script>
src="https://code.jquery.com/jquery-2.2.4.min.js"
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
crossorigin="anonymous"></script>
Hope that is all helpful information! (Mobile version has not been set up)
Referenced this page for the build out: [How to] Add an Image/Testimonial Carousel in Unbounce Using A Box Widget
Best answer by Jess
View original