acctman
acctman

Reputation: 4349

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 are off centered to the right so a traditional tab I don't see working

Upvotes: 2

Views: 492

Answers (3)

niksvp
niksvp

Reputation: 5563

jQuery Accordion would be a good example matching your need.

Upvotes: 4

Ravi Parekh
Ravi Parekh

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

Quentin
Quentin

Reputation: 943571

Tabtastic is still the gold standard for this sort of thing.

Upvotes: 2

Related Questions