div show / hide
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开发者_如何学Python are off centered to the right so a traditional tab I don't see working
<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';
}
jQuery Accordion would be a good example matching your need.
Tabtastic is still the gold standard for this sort of thing.
精彩评论