Hey,
Thank you for your work and the exceptional theme.
I am trying to implement infinite scroll with masonry gallery. I’m using jscroll. It’s almost working but there are some problems. First the content were loaded but the pictures were set as hidden and opacity to 0. I am wondering why the class containing gallery part is called
<div class="av-masonry-container isotope av-js-disabled ">
and
<div class="av-masonry-entry isotope-item av-masonry-item-no-image ">
I revealed pictures by setting css rules to:
.av-masonry-entry {
visibility: visible !important;
opacity: 1 !important;
}
Next problem is related to the lightboxes. All loaded pictures by jscroll won’t open as a lightbox. Instead they open in a new tab as a whole picture. In developer tools I see that the events are not attached to the gallery entries.
I enclose the code:
add_action( 'wp_enqueue_scripts', 'load_jscroll' );
function load_jscroll(){
wp_register_script('jscroll', 'https://cdnjs.cloudflare.com/ajax/libs/jscroll/2.4.1/jquery.jscroll.min.js', false, '1.11.3');
wp_enqueue_script('jscroll');
}
function infinite_scroll() {
global $avia_config;
echo '<script type="text/javascript">
jQuery( "#works-grid" ).jscroll( {
debug: true,
nextSelector: "span.current + a",
contentSelector: ".works-grid",
autoTrigger: true
} )
</script>';
}
add_action( 'wp_footer', 'infinite_scroll' );
What am I doing wrong?
Hey ppietruczak,
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
Basilis