Ask your JavaScript questions! Pay money and get answers fast! (more info)

jQuery Tabs and Accordions JavaScript


Hi There,

I have some jQuery tabs and accordions, and I need to make some modifications to them. If you prefer to use an entirely new script that is ok with me, please just keep in mind I will need to style the accordions / tabs exactly as they are styled now.

Here is a demo URL:

You can also download the HTML/JS files used in the demo here:

<strong>The modifications I need to make are as follows:</strong>

- I need for the ability to have an "open accordion" on page load. For example, I need the ability to specify a certain accordion section to be automatically opened when the page loads. (IE the second section would be opened by default)

- I need for the ability to have a certain tab selected on page load. For example I need for the ability to have lets say the "3rd tab" selected when the page loads.

- I need for the ability to nest tabs. For example, I need the ability to be able to put a set of tabs within another set of tabs. So for example if you clicked on "Tab 2" it might have 3 more tabs inside of the "content area" of Tab 2. (currently things get all jumbled if trying to nest tabs)

Thanks so much for your assistance. Please let me know if there's anything else I need to provide for these customizations. (more files, more prize money, etc)


Answers (2)


Christianto answers:


Please download zip attachment and review it..
Since HTML only allowed one ID, I change the markup and update the script to work with multiple tabs.


Christianto comments:

I update the file to use more standard value for href attribute..
Please download this attachment..