- This topic is empty.
November 26, 2010 at 7:31 pm #30816
I’m using the jQueryUI Tabs to show a small gallery of images. I’m a bit worried about load time. Is there a way to prevent the non-visible images from loading till the user selects the tab to make them visible?November 28, 2010 at 4:55 pm #71934
hmm… no ideas on this one?November 28, 2010 at 11:53 pm #71904
Try setting their display to none with css and use jQuery to make them display: block when the tab is clicked.November 29, 2010 at 2:35 am #71914
If they’re displayed:none, would the browser still load them on page load?November 29, 2010 at 5:40 am #71884
I remember images not being loaded until I set the display to ‘block’ – Which was a problem at the time lol.November 29, 2010 at 12:08 pm #71806
There is a really cool way of doing this that I’ve seen lately, but I don’t know what it’s called!
Ah ha! – Lazyload http://www.appelsiini.net/projects/lazyloadNovember 29, 2010 at 1:36 pm #71803
I came across lazyload, but the disclaimer at the top worries me.
“Lazy Load is currently not usable. It does not work with the latest browsers as expected. I have currently no time updating the code myself. Patches are always welcome. If you find a solution just fork and send a pull request. Thanks!”
And that was written in September of 2007. That sounds like something to be concerned about. Plus it says it doesn’t work in safari and looking at the comments, there are some Firefox 3.6 issuesNovember 29, 2010 at 2:17 pm #71793
As far as I can see, it works on modern browsers (as I visit quite a few sites that use it). The disclaimer at the top didn’t make any sense to me.November 29, 2010 at 4:12 pm #71770
I have another question maybe you can clarify the meaning of
Does this only work with images further down the page, or also with images inside hidden divs?November 29, 2010 at 4:40 pm #71766
I’m actually unsure, to be honest with you. You’d have to test that out.November 29, 2010 at 4:46 pm #71767
K, well I’m going to wait to mark this as Solved to see if anyone else has any ideas for any other options.November 30, 2010 at 3:21 am #71703
Have you given the display: none approach a try?November 30, 2010 at 10:49 pm #71659
I havent on the images themselves, but the div they’re in. Does setting the image to display none increase loading speed?December 1, 2010 at 12:03 am #71661
Do they have to be <img> elements? I did a test and if an element is set to display none, the background image isn’t loaded.December 1, 2010 at 1:15 am #71665
Yeah, they’re elements, background images aren’t an option