I am trying to incorporate Parallax.js (jQuery) and Ajax Load More (WordPress plugin) to the same page. When Load More changes the length of the page, the parallax images should re-position themselves with everythig else, but they don't, so I am left with empty spaces where the images should be.
The problem can be seen here – scroll down to 'Past Events'.
I realise that Parallax needs to be re-triggered when the page is re-sized (as per this thread) but I have not managed so far to write the code that will make this happen. Part of the issue may be that I'm using the Ajax Load More WordPress plugin and so don't have the same kind of access to the code as for the Parallax effect (I don't want to edit the plugin files themselves).
I am loading the scripts in the theme files as follows:
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/jquery.parallax.min.js"></script>
and calling the images as follows:
<div class="parallax-img" data-parallax="scroll" data-src="<?php the_field('page_break_1'); ?>" data-bleed="50" data-midnight="mh-clear"></div>
The repeater for the Load More function is simple php which I can share if it is helpful but which seems irrelevant to this function – I'm not sure what the plugin is doing code-wise beyond that.
I am hoping for the absolute positioned elements (parallax scrolling images) to have their positions re-plotted when the page is made longer. How can I write the function that will make this happen please?