Xenonsoft
Active Member
Hey y'all.
Just developing our portfolio page for the new site and thought the best way to display the images would be to preload them and then change onclick for the relevant title.
That's fine, I've got that done, just need a bit of a tweak.
Underneath the image there'll be a paragraph or two of text that will relate to a specific image, so there'll be numerous div's containing the summary paragraph for that image.
So I'm needing some code that will 'hide' all div's named and then 'show' the div relating to the text just clicked.
What I've got so far:
Just developing our portfolio page for the new site and thought the best way to display the images would be to preload them and then change onclick for the relevant title.
That's fine, I've got that done, just need a bit of a tweak.
Underneath the image there'll be a paragraph or two of text that will relate to a specific image, so there'll be numerous div's containing the summary paragraph for that image.
So I'm needing some code that will 'hide' all div's named and then 'show' the div relating to the text just clicked.
What I've got so far:
Code:
<img src="../images/portfolio/neylonhealth.jpg" alt="Portfolio Images" id="change" />...Further down...<li><a href="#" onclick="document.getElementById('change').src='../images/portfolio/nothing.jpg'" onclick="document.getElementById('Nothing'). DoTheActionThing ">Nothing</a></li><li><a href="#" onclick="document.getElementById('change').src='../images/portfolio/small_b.jpg'">Small b</a></li><li><a href="#" onclick="document.getElementById('change').src='../images/portfolio/forestlife.jpg'">Forest Life</a></li><li><a href="#" onclick="document.getElementById('change').src='../images/portfolio/stocks_studio.jpg'">Stocks Studio</a></li><li><a href="#" onclick="document.getElementById('change').src='../images/portfolio/tbtv.jpg'">TrueBlueTV</a></li>..Which will affect the paragraph's further down too..<div class="change2" id="Nothing"><p>Sandra Neylon from <a href="//www.neylonhealth.com/" class="colour">DummyText</p></div>