How to load a specific hidden image
See original GitHub issueI have a slider on my site containing large images whereby only one slide is shown at a time. I would like to lazy load all the images in the slider using data-srcset. If I use the plugin “out of the box” the first slide is loaded correctly. Upon advancing to the next slide, the image is not loaded until I scroll the page a little. I have tried the following code but with no real success:
slickSlider.on('afterChange', function() {
$('.slide.slick-active').next().find('img[data-srcset]').lazyLoadXT({visibleOnly: false, checkDuplicates: false, forceLoad: true});
});
In the above code I target the next slide and look for the image and apply lazyload… Perhaps I’m using the incorrectly. Can someone point me in the right direction.
Issue Analytics
- State:
- Created 9 years ago
- Comments:9
Top Results From Across the Web
Load hidden image to HTML - javascript - Stack Overflow
I do some actions with couple of images, but to work everything smoothly I need the browser to load the images. For example...
Read more >How To Hide Files In a JPG Picture - Online Tech Tips
To unhide your files, right-click on the JPG image where your files are hidden, select Open with, and choose WinRAR archiver. You can...
Read more >Prevent Loading Hidden Images - Tezify
The most intuitive approach to hide an image is to set it's display property to none. The problem with this is that even...
Read more >Hide photos on your iPhone, iPad, or Mac - Apple Support
How to hide photos on iPhone or iPad · Open Photos. · Select the photo or video that you want to hide. ·...
Read more >How To Add Photos to Hidden Album iOS 16! - YouTube
Amazon Daily Deals: http://saunders.gg/amazon❤️ If you enjoy this content, please consider a paid "super thanks" in the video or becoming ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm, I guess
or (if
afterChange
is a slider’s internal event)should work.
+1 for implemention in master