Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
I’m having problems with the preloading of posts for my Vantage Carousel showing a post loop on my home page. When scrolling right through the posts, the loading of a new page of posts doesn’t start until the last post is almost dropping of to the left. I believe the code is assuming that the widget is only showing one post at the time.
I changed the code in jquery.theme-main.js to say
...
$('.vantage-carousel').each(function() {
var $$ = $(this);
var wrap = $$.closest('.widget');
var pp = $$.find('.carousel-entry').length;
var title = wrap.find('.widget-title');
var position = 0, page = 1, fetching = false, complete = false;
var updatePosition = function() {
if (position < 0)
position = 0;
if (position >= $$.find('.carousel-entry').length - pp) {
if (position != 1) {
position = $$.find('.carousel-entry').length - pp
};
if (!fetching&&!complete) {
fetching = true;
page++;
...
which seems to have fixed the issue in my case. I can’t say that it will work all over though…
Hi Fredrik
Thanks for your feedback and effort here.
If you’d like to make this change upgrade safe you’d need to use a child theme, enqueue a a JS file with the same ID so it overwrites the original. And make sure the enqueue function happens after the parent one.