I am using jQuery accordion plugin for my application. Is there a way to open sections at the same time(after page has loaded) so that contents of all pages are shown at the same time. If it is not possible please give me a link where I can achieve similar to that functionality. Thanks. I am a newbie to jQuery.
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
You should read NOTES in this page. Here I copy and pasted it directly from that page:
NOTE: If you want multiple sections open at once, don't use an accordion
An accordion doesn't allow more than one content panel to be open at the same time, and it takes a lot of effort to do that. If you are looking for a widget that allows more than one content panel to be open, don't use this. Usually it can be written with a few lines of jQuery instead, something like this:
Or animated:
jQuery makes it very easy to make your own accordion without a plugin. For example, this HTML:
and this jQuery:
Any time you click on an
accordion_toggler
, the followingaccordion_content
will toggle (slide up or down in this case). To start with all the content hidden but allow multiple to be open at the same time, use this CSS:Solution With Theme!
without a plugin It's really very simple. Use the same mark-up as normal accordion. Copy the classes from a normal accordion to your markup. Add a "little" JavaScript magic and viola!jsFiddle Example (with Theme Switcher!)
The HTML
The JavaScript
Of course, if you still want a jQueryUI Theme Compatible (or so they claim, personally untested) Plugin to add to your Libs, you can find one here!