Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
07-04-2011, 06:58 AM #1
- Join Date
- Feb 2011
- Thanked 0 Times in 0 Posts
Need help with a Gallery/Portfolio
I've tried hosting my WIP website to see how it works. Everything goes well except for the following:
On my Portfolio page:
I have coded a "gallery" in jquery.
When the page starts loading it seems that the browser loads the `Code:
How can I make the `Code:
Thanks in advance!
Last edited by alexgrozav; 07-04-2011 at 07:18 AM.
07-04-2011, 08:12 AM #2
- Join Date
- Dec 2010
- Thanked 558 Times in 551 Posts
But #portfolioSlider is display:block right from the start. Only the .portfolioSlide elements are display:none
But that can still not prevent all the images from loading. If you only want to load the images "just before" they show, you'll have to implement some sort of intelligent image pre-loading
You will have to do that for all the images on the current tab as soon as the tab changesCode:var theElement = document.getElementById('tripfish'); var theSlideBG = theElement.getElementsByClassName('slideBG'); var newImage = document.createElement('img'); newImage.src = 'gallery/tripfish.jpg'; newImage.width = 940; newImage.height = 822; theElement.insertBefore(newImage, theSlideBG);