jonniejoejonson Posted May 7, 2011 Share Posted May 7, 2011 If an images css display is set to none, does that mean that the image is not actually downloaded until the display is changed?... I am trying to create an image gallery that has roughly 100 large images in it. I wanted them to be placed on a div that is masked with overflow hidden... However i obviously dont want to have to download all 100 images at once, what would be the best way to go about this... Would you... download 10 images and when the gallery gets to positiuon 10 download the next 10 images?... or is there a way to do it all at once without having to download them all at once... kind regards to any responders. Quote Link to comment https://forums.phpfreaks.com/topic/235744-image-displaynone/ Share on other sites More sharing options...
jcbones Posted May 7, 2011 Share Posted May 7, 2011 Yes, the images will be DN'ld if the display is set to none. My preferred way for this to work is using AJAX to call the images as you need them. So, if you just used thumbnails on the page, and then on the mouseover (hover) you would download the full image and show it. Or, you could use something like lightbox. Quote Link to comment https://forums.phpfreaks.com/topic/235744-image-displaynone/#findComment-1211766 Share on other sites More sharing options...
xyph Posted May 7, 2011 Share Posted May 7, 2011 AJAX would be the best way. If you only want to display one at a time, an easier and still standard way is i-frames. Quote Link to comment https://forums.phpfreaks.com/topic/235744-image-displaynone/#findComment-1211771 Share on other sites More sharing options...
spiderwell Posted May 7, 2011 Share Posted May 7, 2011 If you only want to display one at a time, an easier and still standard way is i-frames. why on earth would you use iframe to change one image at a time!!! simple javascript can more than easily do it Quote Link to comment https://forums.phpfreaks.com/topic/235744-image-displaynone/#findComment-1211882 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.