Pages

jQuery Accordion

Trying out jQuery - here's an Accordion in less than 10 lines of javascript!



You can also see the demo / code here. [in case the iframe gets blocked]

How it works

Structure:
Accordion
-- AccordionPage
------AccordionHeader
------AccordionContent
-- AccordionPage
------AccordionHeader
------AccordionContent

Logic:
On-click of Header - hide all 'content' and display the 'content' which is a sibling of the header.

Javascript:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.