Open matmartinstudio opened 5 years ago
Same. If I resize manually the image looks good, but not when I scroll. Adding the trigger events doesn't make a difference.
Did anyone find a way to solve it? Resize works perfectly but I have te same problem on scroll.
Had the same problem, fixed it by using the vanilla JS version:
window.dispatchEvent(new Event('resize'));
With ref to https://github.com/pixelcog/parallax.js#notes, I am finding it impossible to trigger a resize event in order to re-position images in parallax divs. I am having this issue on several sites – it can be seen currently at this site (scroll down to "Past Events", click on "Load More" and check image in div below).
I'm adding
$(window).trigger('resize').trigger('scroll');
to the click event in the site footer and checking it with a console.log that's returning as expected. But the resize is doing nothing.I should add that adding a slight delay to the whole, like this makes no difference:
setTimeout(function(){ $(window).trigger('resize').trigger('scroll'); }, 500);
Am I implementing this incorrectly?
Thanks.