Unable to exclude custom class
-
Hi there,
I’ve added a custom class to product images loaded by Ari Lightbox with this code:$("img").addClass("myimg")
And added ‘myimg’ to the ‘CSS classes to exclude’ area, but the images are still be lazyloaded.
The custom class is working fine but I’m seeing ‘class=”wp-post-image myimg lazyloaded”‘
The reason I need to do this is that if a product has variant options (I have all variations viewable on the catalog page) when a customer clicks on a variation to be taken to the product page, the wrong product image is displayed (default rather than variation). If lazy loading is disabled the correct image is displayed.
I’ve also tried stopping lazy loading for /product/ in the ‘Exclude pages by URI’ section, but this stops the thumbnails in the cart widget from loading.
Any idea how I can get the custom class to not be lazy loaded?
Thanks for your help!
Kind regards,
JP
- The topic ‘Unable to exclude custom class’ is closed to new replies.