on the site under wordpress, given the change of quotes in the following way:
In the central page there is a code:
<div class="t-quote animated fadeInUp"> <?php the_field('default_quote'); ?> </div> <div class="hide quote-block"> <?php if ( have_rows('quote') ): while ( have_rows('quote') ) : the_row(); ?> <div class="quote-text"><?php the_sub_field('quote_text'); ?></div> <?php endwhile; endif; ?> </div> There is also javascript:
$('.slider-bg ul').carouFredSel({ items: 1, pagination: { container: '.pager', anchorBuilder: function(nr) { return "<a href='#' class='pag'><i class='fa fa-circle' aria-hidden='true'></i></a>"; } }, responsive: true, auto: { timeoutDuration: 5000 }, scroll: { items: 1, fx: "crossfade", duration: 1000, pauseOnHover: false, onAfter: function(t) { var quote = quotes[Math.floor(Math.random() * quotes.length)]; $('.t-quote').html("<div class='animated fadeInUp'>" + quote + "</div>"); } } }); I advise you to substitute the current index of the array being processed, something simple and elegant, like in PHP: instead of var quote = quotes[ рандомное число] , like in PHP: getRowIndex() , so that the quotes will pop up not by chance, but consistently. I'm not a programmer, but I want to figure it out.