NameSilo

Hide show div problem

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

jon21021985

Established Member
Impact
1
Hide show div problem $15 to solve it

$15 to solve it!


Hi all, I am using this script to hide and show divs on my webpage, I want a dive to show on the left when a flash thumbnail is clicked and the previous div to be hidden.

this is what I have so far: http://www.design-direction.net/portfolio/index.html



I have this in my head section:

<script type="text/javascript">
function clearcontent() {
if (document.getElementById)
{
var style2 = document.getElementById("w1").style;
style2.display = "block";
var style3 = document.getElementById("w2").style;
style3.display = "none";
var style3 = document.getElementById("w3").style;
style3.display = "none";
var style3 = document.getElementById("w4").style;
style3.display = "none";
var style3 = document.getElementById("w5").style;
style3.display = "none";
var style3 = document.getElementById("w6").style;
style3.display = "none";
var style3 = document.getElementById("w7").style;
style3.display = "none";
var style3 = document.getElementById("w8").style;
style3.display = "none";
var style3 = document.getElementById("w9").style;
style3.display = "none";
var style3 = document.getElementById("w10").style;
style3.display = "none";
var style3 = document.getElementById("w11").style;
style3.display = "none";
var style3 = document.getElementById("w12").style;
style3.display = "none";
var style3 = document.getElementById("w13").style;
style3.display = "none";
var style3 = document.getElementById("w14").style;
style3.display = "none";
}
}
window.onload=clearcontent;

function toggleLayer(whichLayer,turnoff1,turnoff2)
{
if (document.getElementById)
{
// this is the way the standards work
var turnon = document.getElementById(whichLayer).style;
var turnoff1 = document.getElementById(turnoff1).style;
var turnoff2 = document.getElementById(turnoff2).style;
turnon.display = "block";
turnoff1.display = "none";
turnoff2.display = "none";
}
}
</script>




and I have this on each flash button that control if a div is vissable:

thumb1 -


on (release) {
getURL("javascript:toggleLayer('w1','w2','w3','w4','w5','w6','w7','w8','w9','w10','w11 ','w12','w13','w14');");
}


thumb2 -

on (release) {
getURL("javascript:toggleLayer('w2','w1','w3','w4','w5','w6','w7','w8','w9','w10','w11 ','w12','w13','w14');");
}


thumb3 -

on (release) {

getURL("javascript:toggleLayer('w3','w2','w1','w4','w5','w6','w7','w8','w9','w10','w11 ','w12','w13','w14');");
}




and so on
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
closed
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back