Reputation: 4349
Does anyone know of a good example of a div SHOW / HIDE where there is a main DIV and 2-3 other div populate (show/hide) into the Main box? Pretty much what i'm doing is displaying new paragraphs/topic of text.
I understand how to do a standard show/hide with a collapse of a div, but can't seem to find an example of showing divs into a main div
Edit: Maybe I should also add that I need for the links for the show and hide not be nested in the DIV... I have gfx's on the page and the 3 text links are off centered to the right so a traditional tab I don't see working
Upvotes: 2
Views: 492
Reputation: 5594
<input type="radio" name="ValueCost" id="values" checked onclick="javascript:togggleValCost('valueDiv', 'costDiv')" />
<br> Cost Deduction:
<input type="radio" name="ValueCost" id="costDeduction" onclick="javascript:togggleValCost('costDiv', 'valueDiv')" />
//javaScript
function togggleValCost(display, hide){
document.getElementById(display).style.display = 'block';
document.getElementById(hide).style.display = 'none';
}
Upvotes: 4