Colophon
Kevin Miller I love Ruby on Rails, Prototype and Scriptaculous. Together we can do wonderful things, stick around and lets make some really cool stuff!
Activity
267 total comments, leave your comment or trackback.
Kevin Miller I love Ruby on Rails, Prototype and Scriptaculous. Together we can do wonderful things, stick around and lets make some really cool stuff!
Sep 18th 2007
Rock on…
Sep 18th 2007
Great - thanks for the update…
BTW: The download section needs updating to According 2 it still mentions 1
cheers, Dave Porter
Sep 18th 2007
& the link on the right does not go to version 2
Dave
Sep 19th 2007
Great stuff, just a thought, why not recommend using the terrific but under-used “” tag for the accordions, that makes the most semantic sense to me, use the “dt” for the header and the “dd” for the content as a bonus you get a wrapper for the whole thing as well!
Sep 19th 2007
hmm… that should say the terrific but under-used “dl” tag
Sep 19th 2007
I tested it on IE and FF - seems to open the whole tab and then reveal slowly.
I tested your copy on your server in my ie and ff - and it did the same.
Sep 19th 2007
Like Dan mentioned above, when you close all of the tabs in vertical view, then open one, the entire tab shows up (pops), then it hides, then grows. It’s pretty jarring. The horizontal accordion works fine though in the same scenario.
Overall, it looks great.
Sep 19th 2007
Just found out about Accordian from the del.icio.us homepage.
Btw, I noticed you wanted to test on a Mac — if you need to test Safari, you can get Safari for Windows now for free (it’s in Beta 3).
Sep 19th 2007
How would you add a button in each section, that when clicked, would open the next section? I have tried to use the activate command, but to no avail.
Thanks.
Sep 19th 2007
Why isn’t it keyboard accessible.
Sep 19th 2007
Lars Huring - Great idea! You can do this with the script, just change the elements and add the class names.
Dan - I think I see what you mean. I will look into this, I think its a content issue, not the accordion itself. I will post an update when I have a chance this week.
Matt - Send a link to an example and I will take a look.
BP - It’s not yet as I am still mulling around the best way to do this, any thoughts would be appreciated.
Sep 20th 2007
hey Kevin, thanks for all your efforts and listening to your fans!
Does this mean I can now ‘nest’ a lightwindow inside a tab of the accordion and while locking out the width, allowing user the ability to view images/quicktimes etc. within the tab section, while the tab section vertically resizes accordingly.
And if so how!
thanks
Sep 20th 2007
(I’m french, sorry for the level in english)
I dont manage to install your accordion 2.0
I just want to create a simple accordion (1 vertical tab)
What code should I exactly write in the Sidebar.php and style.css ?
Thx a lot, your script is great ^^
Sep 21st 2007
Hi Kevin
Lovely script, definitely gonna find a nice use for this.
One thing though - it works fine on both my PC’s, but my laptop shows it as this:
http://img231.imageshack.us/img231/4738/accordiondn3.jpg
It’s pretty up to date, so I can’t figure out what the problem could be.
Any ideas?
Sam
Sep 21st 2007
Hi Kevin,
Great script! Thanks so much for creating this. I searched for a long time for something like this. My question is: how do I get different images to show up for each of the panels up and active states. I want each panel to have different images. I’ve tried setting up different styles to tell the panel to but I think it is controlled more in the javascript. Help!
Thank you!
Sep 22nd 2007
Hi Kevin,
Thank you for providing this script. If you just want to have a horizontal accordion with out the vertical ones what do I need to do.
When I remove the vertical ones it dosen’t seem to work.
PS: Very new to this.
Thanks.
Sep 22nd 2007
Quick question,
First off, great work!
I’m using the accordion for a side nav. However, I’d like to use it as a content holder as well. Can you use two instances of it on the same page? If so, how?
Thanks in advance.
Sep 22nd 2007
Actually, my apologies,
I think the better questions is why does the accordion stop working when you strip out the nested vertical and horizontal accordions?
Sep 24th 2007
nice script works well and striaghtforward. I Was wondering if there was a simple way to change the handle function so that if one has specified No-Toggle or similar, then it would leave any other tabs open instead of closing them (As it does if one opnes another)?
I couldnt manage this, if you could give me a pointer that would be great?
Sep 24th 2007
Ditto on Dan and Alex… the “flash” before the slide makes me sad. Others, good work, thanks for sharing.
Sep 25th 2007
I’m having the same problem as A Claassens: I can’t get the horizontal accordion to work without the vertical ones around it.
Can you please post how to use ONLY the horizontal accordion?
Thanks.
Sep 26th 2007
nice, but i have a suggestion for the next version
extend the options to also have callbacks for before and after activate - for every single headline - that would be perfect!
Sep 28th 2007
Love the script, but having a small issue. Every browser works great… except Safari for Mac. More often than not, when an accordion section opens, the content inside that section is not displayed. The section is the correct height, but no content. This is fairly random, on some refreshes it’s fine, others not. If it loads correctly then I move onto another section and back again, the content will disappear. Anyone else having this problem? If so, is there a solution. I realise this could be tricky to answer without seeing my code. Thanks
Sep 28th 2007
Ignore my last post… all sorted
Sep 28th 2007
mmm. el script es genial y muy bueno…
pero al implementarlo tengo problemas ya que en ff2 se ve muy bien y funciona bien pero en ie7 se separan los submenus yel click se pierde y el tiempo de abrir es mucho nose como resolverlo….
Sep 29th 2007
I love the code, but I don’t seem to be able to avoid the flash on load for vertical accordions. I tried the “Preload” tip from Will Shaver in every permutation, without success. It seems (on Mac, for variety of browsers) that instantiation-on-page-load of a vertical accordion flashes that accordion. The code is straightforward:
Event.observe(window, ‘load’, loadAccordions, false);
var bottomAccordion = new accordion(’vertical_container’);
}
then
Meetings
Even when I skinny down the Accordion v2.0 Demo page I get the effect. Am I doing it wrong, or is there no way around this?
Oct 1st 2007
Hey, thanks for the script. I’m have some troubles with it in IE. I’m using multiple embedded vertical accordions. It shows up in Firefox just fine, but the IE version isn’t working for some reason. Could someone give me a hand?
Sorry in advance for the messy code, I’m relatively new at this. The webpage is www.oberlin.edu/economic/test
Thanks!
Oct 3rd 2007
After days of searching… Yours is the only accordion that works any good (if at all) horizontally. I just have a few questions about horizontal layout…
Is there any way to get it to sit in the center of the screen so that it opens up to the left and right when you click on a tab? This would be a great feature to have, kind of like a story book…
Oct 4th 2007
Hiya Kevin!
Thanks a lot for a great script - the only one that works as intended with a minimal amount of scripting in fact
One tiny gripe/suggestion though (would be boring if there wasnt SOMETHING…):
We are using the vertical implementation on a page for a user profile and would like to use the option “expand all” and “collapse all”.
The latter is straight forward, just looping through all the inactive accordion sections and deactivating them.
The “expand all” function however has eluded me so far… is there any way of doing this with the existing code, or would it require extensive changes? I understand that only one accordion section is flagged as “active” at any given time, so I probably cant set them all to active…
Any thoughts?
Sorry for the long write-up!
Great work again, thank you so much for sharing it!
Oct 4th 2007
Well, I’m italian, so excuse me for my english: it could sounds a little strange. Accordion it’s a big idea: I reckon one of the best idea for web design. Some years ago we were used to cover the clients browser screen with lots of boring pop-up. And do you remember the ani gif? Those ridicoulos two-state images (me sad-me laughing = send us an email) used to get users to a new dimension and only useful to ge users into a invincible maze.
And now, simple, cool, fashionable, sexy, it comes from the future: your accordion. No more popups, no more stupid animated gifs, no more very long pages. Well done!
Thank you very much. I’ll try to use it in a new web site.
Thank you again.
Alf
Oct 7th 2007
I was able to fix the problem where the content will fully show for a split second before it slides into view by changing “height: ‘auto’” in the deactivate function to “height: ‘0px’”.
I still can’t get rid of the flash of all the contents when the page loads though. The tip from Will Shaver didn’t seem to work.
Great script though, thanks!
Oct 9th 2007
@Rich Yeah, that works perfect for getting rid of the flash vertically, except it messes up the horizontal one. So just do a check and let horizontal do it how it the old way:
////
if(this.options.direction == ‘horizontal’){
this.showAccordion.setStyle({
height: ‘auto’,
display: ‘none’
});
}
else{
this.showAccordion.setStyle({
height: ‘0px’,
display: ‘none’
});
}
////
Oct 10th 2007
Hi, good stuff.
There is a slight error in your code (in the distributed package) that dont allow a very useful piece of script to be activated:
Should be :
var verticalAccordions = $$(’_accordion_toggle’);
verticalAccordions.each(function(accordion) {
$(accordion.next(0)).setStyle({
height: ‘0px’
});
});
Where you put a “.”
var verticalAccordions = $$(’.accordion_toggle’);
To be corrected for horizontal accordion as well:
var horizontalAccordions = $$(’_accordion_toggle’);
horizontalAccordions.each(function(accordion) {
$(accordion.next(0)).setStyle({
height: ‘0px’
});
});
Oct 11th 2007
Hi there,
i think ure ideas are great!
i was testing the accordion v2 at work. for some reason they use a avant browser. And some black lines appeard below and above the textblocks. for myself i use FF and i dont have that problem there.
thought u would like to know in case u want to fix that as well.
keep up the good work.
Bram
Oct 12th 2007
Ok so my gripe is perhaps one that I’m never gonna solve without writing a new style of accordion that doesnt rely on scripaculous blind/scale effects*.
I have an accordion set up that has a bunch of div.accordion_content divs that are all a set height - with titles that are also set heights, to live in a box of a set height. And I want my accordion to operate without altering the containers height.
And thus far I havent found a way of doing it using blind/scale effects - as doing the blind or scale makes the titles below the currently animating one hop or jump.
Yours does this too - but I think yours is ignoring the height setting for vertical accordions as looking at the DOM it has an inline style of height: auto on the div.accordion_content. Even with that hacked to be my set height, I still get the bottom hopping.
*I think the only solution when needing to be pixel perfect with lots of set heights is to position: relative move the titles and div.accordion_content divs up and down to mask the content. I’m just too busy to get my head into gear to write one right now
Oct 12th 2007
Oh should have said - the reason I think it does the hopping on set size stuff is rounding errors when scriptaculous does its percentage based resizing of elements with scale/blind.
Oct 14th 2007
Hey Kevin,
Check out the latest use of your lightwindow on our site here:
http://www.designrelated.com/news
You have to be logged in to use it, however, since it’s used in the “add a post” functionality.
Keep up the great work!
Oct 15th 2007
Hey I added a bit of functionality to allow the accordion to be open at all times.
This disables the current tab that is open so you can’t close it.
It’s simply a boolean in the options.
// accordion.js v2.1
//
// Copyright (c) 2007 stickmanlabs
// Author: Kevin P Miller | http://www.stickmanlabs.com
//
// Accordion is freely distributable under the terms of an MIT-style license.
//
// I don’t care what you think about the file size…
// Be a pro:
// http://www.thinkvitamin.com/features/webapps/serving-javascript-fast
// http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files
//
// alwaysOpen:Boolean — Added the option to always keep the accordion open. - Justin Luk
/*———————————————————————————————–*/
if (typeof Effect == ‘undefined’)
throw(”accordion.js requires including script.aculo.us’ effects.js library!”);
var accordion = Class.create();
accordion.prototype = {
//
// Setup the Variables
//
showAccordion : null,
currentAccordion : null,
duration : null,
effects : [],
animating : false,
//
// Initialize the accordions
//
initialize: function(container, options) {
if (!$(container)) {
throw(container ” doesn’t exist!”);
return false;
}
this.options = Object.extend({
resizeSpeed : 8,
classNames : {
toggle : ‘accordion_toggle’,
toggleActive : ‘accordion_toggle_active’,
content : ‘accordion_content’
},
defaultSize : {
height : null,
width : null
},
direction : ‘vertical’,
onEvent : ‘click’,
alwaysOpen : false
}, options || {});
this.duration = ((11-this.options.resizeSpeed)*0.15);
var accordions = $$(’#’ container ‘ .’ this.options.classNames.toggle);
accordions.each(function(accordion) {
Event.observe(accordion, this.options.onEvent, this.activate.bind(this, accordion), false);
if (this.options.onEvent == ‘click’) {
accordion.onclick = function() {return false;};
}
if (this.options.direction == ‘horizontal’) {
var options = $H({width: ‘0px’});
} else {
var options = $H({height: ‘0px’});
}
options.merge({display: ‘none’});
this.currentAccordion = $(accordion.next(0)).setStyle(options);
}.bind(this));
},
//
// Activate an accordion
//
activate : function(accordion) {
if (this.animating) {
return false;
}
this.effects = [];
this.currentAccordion = $(accordion.next(0));
this.currentAccordion.setStyle({
display: ‘block’
});
this.currentAccordion.previous(0).addClassName(this.options.classNames.toggleActive);
if (this.options.direction == ‘horizontal’) {
this.scaling = $H({
scaleX: true,
scaleY: false
});
} else {
this.scaling = $H({
scaleX: false,
scaleY: true
});
}
if (this.currentAccordion == this.showAccordion) {
if(this.options.alwaysOpen == false) this.deactivate();
} else {
this._handleAccordion();
}
},
//
// Deactivate an active accordion
//
deactivate : function() {
var options = $H({
duration: this.duration,
scaleContent: false,
transition: Effect.Transitions.sinoidal,
queue: {
position: ‘end’,
scope: ‘accordionAnimation’
},
scaleMode: {
originalHeight: this.options.defaultSize.height ? this.options.defaultSize.height : this.currentAccordion.scrollHeight,
originalWidth: this.options.defaultSize.width ? this.options.defaultSize.width : this.currentAccordion.scrollWidth
},
afterFinish: function() {
this.showAccordion.setStyle({
height: ‘auto’,
display: ‘none’
});
this.showAccordion = null;
this.animating = false;
}.bind(this)
});
options.merge(this.scaling);
this.showAccordion.previous(0).removeClassName(this.options.classNames.toggleActive);
new Effect.Scale(this.showAccordion, 0, options);
},
//
// Handle the open/close actions of the accordion
//
_handleAccordion : function() {
var options = $H({
sync: true,
scaleFrom: 0,
scaleContent: false,
transition: Effect.Transitions.sinoidal,
scaleMode: {
originalHeight: this.options.defaultSize.height ? this.options.defaultSize.height : this.currentAccordion.scrollHeight,
originalWidth: this.options.defaultSize.width ? this.options.defaultSize.width : this.currentAccordion.scrollWidth
}
});
options.merge(this.scaling);
this.effects.push(
new Effect.Scale(this.currentAccordion, 100, options)
);
if (this.showAccordion) {
this.showAccordion.previous(0).removeClassName(this.options.classNames.toggleActive);
options = $H({
sync: true,
scaleContent: false,
transition: Effect.Transitions.sinoidal
});
options.merge(this.scaling);
this.effects.push(
new Effect.Scale(this.showAccordion, 0, options)
);
}
new Effect.Parallel(this.effects, {
duration: this.duration,
queue: {
position: ‘end’,
scope: ‘accordionAnimation’
},
beforeStart: function() {
this.animating = true;
}.bind(this),
afterFinish: function() {
if (this.showAccordion) {
this.showAccordion.setStyle({
display: ‘none’
});
}
$(this.currentAccordion).setStyle({
height: ‘auto’
});
this.showAccordion = this.currentAccordion;
this.animating = false;
}.bind(this)
});
}
}
Oct 15th 2007
Hi
I am trying to implement a categorized section of content per grade. So I have vertical tabs for each grade, then in each grade there are various pieces of writing that I want in their own each nested vertical tab. Basically I just took what the demo index.html file has then duplicated the vertical nested section like 5 times. Once I run it though, only the first set of nested tabs are hidden. When I click on any of the other grades and reveal the nested tabs, those are all already opened.
What is going on? Is it to do with the reuse of ID names and the javascript only referencing the first set of ids?
Any help would be appreciated! I’ve been fiddling around for a few days now trying to make it work.
Oct 18th 2007
I’ve got a situation where I need to dynamically add new accordion toggles and content to an existing one. I added the following function to do so, and it seems to work well. There may be a way to do it that doesn’t require putting the new toggle in an array first, but I’m just getting started with Prototype and this was the fastest way for me to make things work. I only wish I’d checked your site a week ago…. I spent about 3 days adding the ability to nest vertical accordions and resize them when content changes :). But your method for doing so are much cleaner than mine :).
Anyway, here’s my addToAccordion function… i put it between the initialize and activate functions. You can pass either the new toggle element itself or the id of the new toggle element.
addToAccordion : function(newToggle) {
var accordions = [];
accordions[0] = $(newToggle);
accordions.each(function(accordion) {
Event.observe(accordion, this.options.onEvent, this.activate.bind(this, accordion), false);
if (this.options.onEvent == ‘click’) {
accordion.onclick = function() {return false;};
}
if (this.options.direction == ‘horizontal’) {
var options = $H({width: ‘0px’});
} else {
var options = $H({height: ‘0px’});
}
options.merge({display: ‘none’});
this.currentAccordion = $(accordion.next(0)).setStyle(options);
}.bind(this));
},
Oct 18th 2007
Hi All
Maybe simple question but how can I get a different fixed background on toggle active/non-active for every horizontal toggle bar ???
By duplicating css code en renaming and attaching every tab with its own css class doesnt do the trick I guess the class code in JS…. But then again I want to keep in intact withoud changing the code [due updating etc etc]
anyone any tips on that ??
Ciao Valentijn
Oct 18th 2007
Hello …
How can I dynamically alter the accordion frame sizes ?
http://candida.bri.nrc.ca/acctest.cfm
Javascript Examples:
winW = window.innerWidth-50;
function loadAccordions() {
**** some code deleted ***
content : ‘horizontal_accordion_content’ }, defaultSize : { width : 800 }, direction : ‘horizontal’ });
I want to change the 800 value with the value of winW.
And at the bottom of my page, I am trying to adjust the sizes of my horz. accordion
side-selection bars to 100px (for testing), but that doesn’t work. Eventually I want to use the dynamically set horAccSize value.
var horAccSize=window.innerHeight-220;
var hAccordions = $$(’.horizontal_accordion_toggle’);
hAccordions.each(function(accordion) {
$(accordion.next(0)).setStyle({
height: ‘100px’
});
});
Thanks in advance for your replies.
- Marco.
Oct 18th 2007
Hi Marco
Do you know how to adjust the css or js so I can create customizable tab backgrounds??
Ciao Valentijn
Oct 18th 2007
Hello Valentijn …
I assume it should look something like this, but I have not tested it …
Your accordion tab
etc …
Javascript:
document.getElementById(’AccTab1′).style[’background’].url=’http://your.image.jpg’;
Groetjes.
- Marco.
Oct 18th 2007
Hello Valentijn …
I assume it should look something like this, but I have not tested it …
[h1 id=”AccTab1″ name=”AccTab1″ class=”accordion_toggle”]Your accordion tab [/h1]
etc …
Javascript:
document.getElementById(’AccTab1′).style[’background’].url=’http://your.image.jpg’;
Groetjes.
- Marco.
Oct 18th 2007
I am trying to figure out now how I can make gradient bars with the javascript from this website http://slayeroffice.com/code/gradient/
- Marco.
Oct 18th 2007
Hey Marco [Dutch indeed but try to keep it english
]
Ok now how to do that but how can I override the tab with onmouseclick cause the event is already in use by accordion js or prototype etc etc….
You can reach me at ontwerp AT zonnet.nl
Must be a better way
Ciao
Oct 18th 2007
Marco : what is your problem with the gradients??
Give me a link or so maybe we can help eachother out…
Oct 19th 2007
Hi all
I gave this script up for no cause I cannot figure out to adjust design customization ad hoc. So I used Spry [adobe labs] and that’s capable of overiding onclick events etc :
css:
//eg : setStyle(’acc1′,’color’,'blue’);
function setStyle(objId, style, value) {
document.getElementById(objId).style[style] = value;
}
for eg.
then on a tab,link or whatever : onclick(”setStyle(’idofdivorduch’,'color’,'red’)”;)
This works great in spry !
anyone any tips on doing such within Accordion 2.0 ??
Oct 21st 2007
Three quick things about the latest download:
1) Thanks, it’s great!
2) The page title still says v1.0
3) The css isn’t included in the zip. I copied yours and added the folder/file manually.
Anyway, just thought I’d point that out in case it helps anyone else.
Oct 22nd 2007
Looks great. What is “MIT-style” license? Do you have the exact text?
Oct 23rd 2007
It seems there’s some strange behaviour using Scriptaculous v. 1.8.0_pre1 (with Prototype v. 1.6.0_rc1).
Can you figure out of it?
Oct 23rd 2007
Hi,
I’d like to for the active accordion to NOT be collapsible as implemented in version 1.0. Is there an easy way for me to turn this feature off?
Thank you for providing this script.
Vic
Oct 23rd 2007
This is wonderful. I tried to MooTools Accordian and could not figure it out. With your tutorial and easy script I was able to successfully put the accordian on the website im working on. My only problem is that it does not push the other entries down when opening a new one. Is there a forum or help section you can direct me to?
Oct 24th 2007
My accordion works perfectly in IE7 but not firefox????? what sort of things can i look for?
chad.camacho@gmail.com
Oct 24th 2007
Awhile back, a poster named Matt had inquired about addding a button to a section in the Accordion menu and being able to open another section within the same accordion. I couldn’t fid a response to his inquiry.. is this possible? I am stuck on this issue. Thanks and great work.
–me
Oct 24th 2007
I have been trying to learn some more Javascript through Prototype and Scriptaculous, this script looked ace. Although I have not been able to get it to generate even the simplest of pages. Javascript is reporting that my div doesn’t exist! This comes from line 1073 in prototype.js
if (typeof element == ’string’) element = document.getElementById(element);
return Element.extend(element);
at the point of the if, element is still ‘my_container’ after the call to getElementById it’s a null
so Element.extend is passed a null
and promptly gibs
So even between us we have no idea! Test page -> http://www.squaresphere.co.uk/statspage/test.html
Oct 25th 2007
I have managed to find the solution to this problem. You will need to add an event observer, for page load, as per the example source. Which then loads all the div’s to accordion.
Oct 25th 2007
I dodwnloaded the lightwindow example. It worked just fine - EXCEPT for the wmv subject - It simply woulden’t work - So I checked the lightwindow.js and found that the wmv were missing. So after adding it - IT WORKED. Your work is just ammazing! THANKS
Oct 26th 2007
Please pardon the possibly simple question.
For a vertical accordion, you place titles on each tab by doing a Title 1
If you try the same thing for a horizontal accordion, well, the text gets cut.
How could one do this? First tried by making jpegs for each of the titles, but then don’t know how to set the background property to be different for each tab.
You can force the title to line up in a column centered on each tab, but the readability isn’t great.
I think what I really want is to specify the background jpeg for each tab. Is it possible?
Thanks for any help.
Oct 27th 2007
I was working arround with the different-background issue.
Finally got the solution, altering the source. So I’ll explain how it works.
First of all, the images’ names must end with a(n) for the actives, and i(n) for the inactives, with (n) the number of the tab.
Example: image_a1.jpg, image_i1.jpg, image_a2.jpg, image_i2.jpg.
The name before the a/i(n).jpg must be the same for all files. Also it only supports JPG.
So, in the declaration of the accordion, we have to declare the ‘background’ property, giving ir the path value of the images after the a/i(n).jpg
Example:
function loadAccordions() {
var topAccordion = new accordion(’horizontal_container’, {
classNames : {
toggle : ‘horizontal_accordion_toggle’,
toggleActive : ‘horizontal_accordion_toggle_active’,
content : ‘horizontal_accordion_content’
},
defaultSize : {
width : 336
},
direction : ‘horizontal’,
background : ‘/images/accordion_’
});
topAccordion.activate($$(’#horizontal_container .horizontal_accordion_toggle’)[0]);
}
If the background is not specified, the path will be ‘/images/accordion_’
The last step is overriding the initial background for each tab for the corresponding inactive image.
Example:
That’s all!!
You can download the modified accordion.js from: http://www.joaco.net/downloads/accordion.js
Hope to save you a headache.
Oct 27th 2007
Where it says: “giving ir the path value of the images after the a/i(n).jpg” should say: “giving ir the path value of the images BEFORE the a/i(n).jpg”
Also, the initial background overriding example didn’t appear. Should say:
without the linebreaks
Oct 27th 2007
damn!
Oct 28th 2007
to answer my own question…
take a look, if you like.
thanks for the js!
Oct 30th 2007
Just upgraded to prototype 1.6.0_rc1, and the Hash changes break the accordion. Removing all instances of $H and var.merge() in accordion.js solved the problem. For example:
Replace:
var options = $H({width: ‘0px’});
options.merge({display: ‘none’});
With:
var options = {width: ‘0px’};
Object.extend(options, {display: ‘none’});
Hope that’s helpful.
Nov 7th 2007
A question: How can I use two or more accordeons in the same page?
Thanks
Nov 9th 2007
does not work after upgrading to Protype 1.6.0 final…
Nov 9th 2007
Thanks for the Accordian js, but in order to get it to work properly I cut and pasted your code from the release 2 page, and am stripping out your content. Now when I try to remove the horizontal menu, it loses the functionality of opening and closing, and is a static open state all the time for all the panels. Can’t I simply delete the horizontal content in that panel? Do I need to remove any javascript?
I thought all I needed to do was replace that section with a the content of another panel. Doesn’t work.
Thanks, I want to donate, but if I can’t get this to work, I can’t.
Nov 11th 2007
I found this accordion is the best as far as I know. I have checked around 10 Ajax accordions, including jquery, mootools, etc.
I played around a bit with accordion v2.0. But one thing I can’t do it. I added one more “A Vertical Nested Accordion”, but the first nested accordion works well but the second one is just open and it does not function as accordion.
Can anyone tell me how to add more than one nested accordions?
Nov 14th 2007
I am using the brilliant accordion as a side vertical nav.
Any idea on how to use javascript to auto-select one of the aocordian menus
when going to another page, i.e. how can you get it to keep state going one
page to another..
Nov 15th 2007
Hi there,
We needed to have the areas within each accordion tab to have a fixed height and be scrollable. It was a simple change. Here’s the diff:
$ diff accordion.orig/accordion/javascript/accordion.js accordion.vnet/javascript/accordion.js
52c52,53
onEvent : ‘click’,
> showscrollbars : false
193c194,195
height: this.options.defaultSize.height ? this.options.defaultSize.height : ‘auto’,
> overflow: this.options.showscrollbars ? ‘auto’ : ‘hidden’
This allows you to fix the height (by default curtailing the content) in defaultSize.height. You can set showscrollbars to true if you want the content to be scrollable.
Cheers,
Erich Enke
Colorado vNet
www.coloradovnet.com
Nov 16th 2007
Hi i really like your script but it’s not working in Prototype 1.6
Nov 16th 2007
your script is really cool indeed - how can i make it work with prototype 1.6 ?
I tried Ryan Holliday’s solution…but i guess i dont get it.
thanks!
Nov 17th 2007
another big fan of this script.
Thanks Ryan for the fix. For those having trouble following his example. You need to get rid of $H(…) just search thru the file and get rid of the $H( and make sure to get rid of the closing parens. Then look for where it it says options.merge(…) and replace it with Object.extend(options, …)
Hope that helps. I did this after upgrading to scriptaculous 1.8 with prototype 1.6 and it repaired accordian.
Nov 22nd 2007
Thanks Ryan!
Your solution also worked for me.
perhaps kevin can release a new version.
ciao,
der flo
Nov 22nd 2007
Hi,
Got the script working nicely but I’d like to be able to have it open a different level by passing the value across from an href in a separate page. Is there any way of doing this? Kind of similar I guess to Grant’s question above (Nov 14th) possibly…?
Many thanks
Nov 22nd 2007
Hi,
I’ve been looking for this kind of script for a while.. Thanks!!
One issue: if get the following browsing your site on FireFox 2 on Mac OS 10.5.1
Warning: Error in parsing value for property ’size’. Declaration dropped.
Source File: http://www.stickmanlabs.com/accordion/
Line: 0
Nov 22nd 2007
Just to check, Maxtone, was your comment in reply to me or completely unrelated? Seeing as the is missing from under my comment I wasn’t sure if that was a reply or not.
Nov 23rd 2007
Hi Corinne,
No, my comment was a general one.
Nov 25th 2007
Hey Kevin, phenomenal job here. I was just wondering if there is a way to make the accordion work by having the title below the content, as opposed to above the content.
I was surprised I couldn’t find any contact information to e-mail you directly.
Nov 29th 2007
i love your accordion.
but can you please fix the little flicker when you go from the first menu at once to the last, and otherwise. in ie7 under vista we have these thiny little problem.
please fix it.
great jens
Nov 30th 2007
Hey.
I guess my question is similar to Corinnes - how can I keep a toggle-window open when I load a new page (like for a photo gallery) in it? It’s however very essential to enable the user to still close this very toggle manually…
Any help will be greatly appreciated
Thanks,
Jan
Nov 30th 2007
Hello
I have just tried to download Accordion, but the zip just seems to contain empty folders and files.
Could you have a look?
Thanks
Dec 3rd 2007
Hi! Great work. Question: How do you populate the content of each accordian’s content with an AJAX call - I mean I click on the header, i make an ajax call to get the content and then the accordian opens and the content retrieved by ajax fills in. BTW send me an email if you need a contribution towards buying a mac.
Dec 3rd 2007
I managed to extract the zip in the end.
But I think this code is broken in prototype 1.6 (to which I am new). The Class.create syntax has changed I believe. Managed to get past that, but things only half work.
The afterFinish in deactivate appears never to run. It is undefined in the effects.js loop function. This leaves showAccordion out of date.
A shame, because this looks like a nice piece of code. I hope the author can take a look!
Dec 3rd 2007
Hi all, really thanx for this script, I Was developping one from an other side.
I had problems with mouseover event, so i tried your one, its cool but it has still some bugs using mouseover…
Dec 4th 2007
Hi there,
Look at my test-website…
accordion@extralarge.nl
Try to put SWF into accordionmenu…
Work perfect on FF en Safari on a MAC, Een looks good on iE6, but not on FF-windows.
SUggestions?
Dec 4th 2007
Is it at all possible to mimic the effect Apple.com is using on its accordion: http://www.apple.com/iphone/
notice when the page loads all of the accordion tabs are expanded and then contract to the default open tab. Is this somehow possible with your amazing work?
ty
Dec 5th 2007
Hi everyone, I would like to say one thing before I get to my 2 little problems.
GREAT JOB!!! with the ACCORDION, I have been able to modify it so I can use it as a side vertical nested menu system (3Levels) except for these couple of issues:
1) For the life of me, I have not been able to figured out a way to get rid of that annoying flash, it seems that it only happens when you re-click to Open header that was already opened and then closed before.
2) Why is it when I move the css styles out of the actual page and put it in an external one the Highlight of the header will not get applied as it will when I leave it @ the top the page??
Alen
Dec 5th 2007
This is great, I had to apply Josh’s changes to make it work with scriptaculous but that wasn’t too difficult.
If you apply the changes to your source I’ll make a donation to your Mac Pro pot.
Dec 5th 2007
Thanks to Josh and Ryan for making it work with Scriptaculous 1.8. To make it simpler for other people, here’s a patch you can apply using the UNIX “patch” command.
[BEGIN PATCH don’t include this line]
— accordion.js.orig 2007-09-18 18:44:30.000000000 -0400
accordion.js 2007-12-06 01:10:23.000000000 -0500
@@ -62,11 62,11 @@
}
if (this.options.direction == ‘horizontal’) {
- var options = $H({width: ‘0px’});
var options = {width: ‘0px’};
} else {
- var options = $H({height: ‘0px’});
var options = {height: ‘0px’};
}
- options.merge({display: ‘none’});
Object.extend(options, {display: ‘none’});
this.currentAccordion = $(accordion.next(0)).setStyle(options);
}.bind(this));
@@ -90,15 90,15 @@
this.currentAccordion.previous(0).addClassName(this.options.classNames.toggleActive);
if (this.options.direction == ‘horizontal’) {
- this.scaling = $H({
this.scaling = {
scaleX: true,
scaleY: false
- });
};
} else {
- this.scaling = $H({
this.scaling = {
scaleX: false,
scaleY: true
- });
};
}
if (this.currentAccordion == this.showAccordion) {
@@ -111,7 111,7 @@
// Deactivate an active accordion
//
deactivate : function() {
- var options = $H({
var options = {
duration: this.duration,
scaleContent: false,
transition: Effect.Transitions.sinoidal,
@@ -131,8 131,8 @@
this.showAccordion = null;
this.animating = false;
}.bind(this)
- });
- options.merge(this.scaling);
};
Object.extend(options, this.scaling);
this.showAccordion.previous(0).removeClassName(this.options.classNames.toggleActive);
@@ -143,7 143,7 @@
// Handle the open/close actions of the accordion
//
_handleAccordion : function() {
- var options = $H({
var options = {
sync: true,
scaleFrom: 0,
scaleContent: false,
@@ -152,8 152,8 @@
originalHeight: this.options.defaultSize.height ? this.options.defaultSize.height : this.currentAccordion.scrollHeight,
originalWidth: this.options.defaultSize.width ? this.options.defaultSize.width : this.currentAccordion.scrollWidth
}
- });
- options.merge(this.scaling);
};
Object.extend(options, this.scaling);
this.effects.push(
new Effect.Scale(this.currentAccordion, 100, options)
@@ -162,12 162,12 @@
if (this.showAccordion) {
this.showAccordion.previous(0).removeClassName(this.options.classNames.toggleActive);
- options = $H({
options = {
sync: true,
scaleContent: false,
transition: Effect.Transitions.sinoidal
- });
- options.merge(this.scaling);
};
Object.extend(options, this.scaling);
this.effects.push(
new Effect.Scale(this.showAccordion, 0, options)
[END PATCH don’t include this line]
Dec 6th 2007
There seems to be a bug with your Accordion 2.0 and the latest scriptaculous revision. The content scales instead of blinds up. Also seems to be causing recursion errors. Any tips/pointers?
Dec 7th 2007
In order to fix the “flickering” on second reopening, change the following rows:
this.showAccordion.setStyle({
height: ‘auto’,
display: ‘none’
});
to
this.showAccordion.setStyle({
height: ‘0px’,
display: ‘none’
});
Dec 7th 2007
$50 Kevin! I will gladly donate $50 to your macbook pro fund if you can implement a fix to have the accordion stay open between pages in the same section.
In other words, instead of using the bottomAccordion.activate($$(’#vertical_container .accordion_toggle’)[4]); to open a section could that simply call a function that opens it on page load without the animation? That way it appears to stay in the same state between pages
see: Grant’s post Nov 14th 2007 as I think he is asking a similar question.
thanks
Dec 11th 2007
Hi,
Great accordion, question I cannot get rid of the flashing in IE could you
please explain me where to put this code if this one is the good to fix that problem.
// Special thanks go out to Will Shaver @ http://primedigit.com/
var verticalAccordions = $$(’.accordion_toggle’);
verticalAccordions.each(function(accordion) {
$(accordion.next(0)).setStyle({
height: ‘0px’
});
});
Thanks a lot Alejandro.
Dec 11th 2007
I was wondering if you can open another pane from within the content of a pane. Say, I have a link within a gridview in one pane. So when I click on that link, I would like it to open up another pane and collapse that pane.
Dec 11th 2007
Hey Kevin,
I also have a similar issue as Chuck and Ian where accordian does not play well with prototype 1.6.0 and effects.js 1.8.0. It appears that Class.create syntax has been changed. Seems to work great with prototype 1.5.1.1 and effects.js 1.7.0, but switching to that causes recursion issues with Effects.DropOut();
what’s the best approach for a fix?
-jim
Dec 11th 2007
turns out that the $H fix mentioned above fixed my issues.
thanks!
-jim
Dec 12th 2007
To Jim..
Did you manage to get the Accordian to work with the latest revision of Scriptaculous. If so, could you please share your fix?
Thanks in advance.
-Maxtone
Dec 16th 2007
Since prototype 1.6.0 was released there are problems with Accordion because it flickers. It only works well with Rel. 1.5.1 but on the other hand for a propper work with autocomplete you need Rel. 1.6.0. So at the moment I can’t use Accordion and autocomplete on one site.
Is there a solution available?
Thanks in advance. It’s a great work you’ve done.
M. Kruppeit
Dec 18th 2007
Accordion doesn’t work with prototype 1.6.0 (as mentioned above). Can we expect an update soon?
Dec 20th 2007
accordion is working fine in IE6 and 7 but giving errors in firefox
Dec 24th 2007
Help!
I have installed a test page but no matter what I try the according constructor can’t seem to find the main container id.
Here is the link:
http://wannenmacherwebs.com/sbb/test5.php
Any ideas?
Dec 26th 2007
Where in this script or in the markup would an ajax call for content be placed? I would like to load the content when the toggle bar is clicked and then expose the content of the div. I didn’t really see any examples of this anywhere and I am having some trouble figuring out how to make it happen.
PaulM
Dec 26th 2007
i have a problem with ul/li toggle. in this html element no toggle working???
Dec 28th 2007
I gathered all of the proper libraries together to make Lightwindow and Accordion work on the same site. Would anyone like a list of these libraries?
Dec 28th 2007
Keith,
When I click on your link I get a 404 error. Can you update the link?
Dec 28th 2007
Frashier,
In order for the ul/li toggle to work they really need to be encapsulated in containers for expanding and contracting. However, a posting of your code would be helpful for debugging?
Dec 28th 2007
Ben,
Hello,
my simply code:
dog
cat
1
2
3
4
dog
cat
1
2
3
4
Dec 28th 2007
Frashier,
Are you hoping to expand the “1 2 3 4″ or are you using ul/li as headlines?
Dec 30th 2007
Ben,
yes i using ul/li as headlines (my accordion_toggle) and expand the “1 2 3 4″ (my accordion_content)
Dec 31st 2007
Just wondered if you actually know what ‘Colophon’ means?
Looks like you’ve misunderstood the use from those O’reilley books!
Jan 2nd 2008
Has anyone successfully created an accordion menu with multiple vertical nested containers? The demo only uses one, and if I try to use more than one, only the first one collapses properly. All others display with contents expanded. I’ve seen a couple other people list the same problem, but I haven’t come across a solution.
Jan 2nd 2008
Frashier,
You should be able to expand a “ul” list that is nested within an “li” tag if you have them properly classed.
I.E.
Dog
Cat
1
2
3
4
I hope this helps!
Jan 2nd 2008
Oh crap! It stripped my tags! Has anyone else had any luck publishing HTML snippets in this forum??
Jan 2nd 2008
Ben, see this thread in the forum: http://forum.stickmanlabs.com/viewtopic.php?id=715
Jan 5th 2008
Great Job! I like the degree of control this accordion implementation gives as compared to the moo.fx effort.
One thing I don’t like, and perhaps its how I’m trying to pull it off — my ‘accordion_content’ elements (div’s, to be specific) contain a number of child div’s. When I click an accordion_toggle element, the content is shown in the two adjacent accordion_content elements, the elements blind up or down appropriately, and the element that’s been commanded to hide finally hides its content. The effect is quite distracting — I have overlapping content for a bit that just doesn’t look right. Is there a way to keep the child divs from showing in the element that’s unhiding its content until the blind effects have completed?
Thanks again.
Jan 8th 2008
Hi,
I am trying to set-up accordian 2.0 to see if its the right thing to use on my site. On first impressions it certainly is the type of effect I am looking for. However I am running into a few problems getting it up and running and I was wondering is there a fourm or anywhere to get support.
TIA,
Adrian.
Jan 8th 2008
Hi there. This is a lovely script but I’m unable to work out how to have multiple accordians on a page. The script sees 2 accordians as being only one.
This issue has been mentioned previously, but there doesn’t seem to be a solution posted above as yet.
Kevin, if you’re able to assist with this, I’ll donate $20 to your macbookpro thing.
Jan 9th 2008
I guess your paypal account will make a nice jump up when the accordion will be updated to work with the latest scriptaculous & prototype…. I’ll be glad to participate to your new mac !
cheers
Jan 10th 2008
yeah i second that emotion. would love it if this worked with the new scriptaculous libs. i tried the hacks posted herein, but i didn’t return the expected results… thanks for your hard work you make websites look better everywhere.
Jan 10th 2008
Mate, this is fantastic. Best accordion script ever!
It’s fast. It’s pretty, it’s free. You absolutely rock!
Jan 11th 2008
Sorry for the double post, but I’d like to thank Ran for his advice on how to stop that annoying flashing from occurring.
Kevin, reckon you could modify the script to reflect his comment? It makes things perfect now.
Also, you got the laptop yet? Because I’m looking at sending you some cash mate!
Jan 13th 2008
Still no update
Jan 13th 2008
Hi,
I LOVE this script, I however have a problem with one thing on it and have spent nights trying to solve it but to no avail.. Help Please… I noticed that the script only supports a maximum of 10 tabs. I have over 16 tabs and onces I create the 11th Tab, the whole script stops working
Any help on how to overcome this? its doing my head in thank you SOOO MUCH
Jan 16th 2008
I’m having similar problems as others regarding recursion issues. Whever I try to use any additional effects on the page at all with the included libraries I’m getting recursion errors in Firefox. I tried to use the newest version of prototype and scriptaculous and it fixes the errors and plays the effects but now the accordion looks weird and jumpy when it is opened/closed. Anybody have a fix?
Jan 16th 2008
Hello, thank you for this awsome script.
I have a small question concerning an external button.
i want to add a button that on click he will open let’s say product accordion number 2?
is there a way to do that ?
Thank you.
Jan 17th 2008
fixed version available in forum post here:
http://forum.stickmanlabs.com/viewtopic.php?id=639
Jan 18th 2008
Hey guys I’d like some help if that is possible.
When content loads every tab is open and the content shows as it loads, until it finishes,
then everything closes and the first tab opens
Is there a way to hide that load, or load with all tabs closed by default? If your answer includes the snippet in the accordion’s instructions, please let me know where does it need to be added, as in which file and between what content?
Any help is highly appreciated : )
P.S. colophone means butt-phone lol! (I’m Greek)
Jan 22nd 2008
Peter,
if you want to open panel 2, you can use this as an onclick event on the button.
For example, if you want to open panel 2:
onclick=”topAccordion.activate($$(’#mainAccordionContainer .accordion_toggle’)[1]);”
Hope this helps.
B
Jan 23rd 2008
Thanks Seengee, effects are now working!!
Jan 25th 2008
Kevin-
Thank you for the accrodion script. I have downloaded it and have been fooling around with it but I have been having a hard time getting two nested accorions to work. Would you be willing (for a fee) to put together the script for me? Here is what I need.
Heading1 (accodion)
subheading1 (nested accordion)
web link
web link
etc.
I would need the above for Heading2 and Heading3 (same config). I would like to have a gradient in the header, but I think I can handle putting a jpg together to handle that. The web links, can they be something more interesting that an a href link?
Please contact me via email. Thanks.
Jan 28th 2008
Hi,
I’m trying to get this working with the latest prototype and scriptaculous (1.6 and 1.8.1 respectively), but the whole system seems to be broken with this new version. The scale scales on both azes and never reappears. I used the same html/css as on your site, but the javascript is the latest prototype/scriptaculous from their respective sites plus your accordion code.
Tom
Jan 28th 2008
I resolved the problem above with the fixes mentioned in the posts above too. I’ve also added an additional feature you might like to include. This is the ability to have the accordion not close entirely.
First, I added an option variable called “closable” which I’ve defaulted to false under this.options = Object.extent(…) - It now looks like this:
this.options = Object.extend({
resizeSpeed : 8,
classNames : {
toggle : ‘accordion_toggle’,
toggleActive : ‘accordion_toggle_active’,
content : ‘accordion_content’
},
defaultSize : {
height : null,
width : null
},
direction : ‘vertical’,
onEvent : ‘click’,
closable : false
}, options || {});
I then added a check for this option in the activate function:
if (this.currentAccordion == this.showAccordion) {
if (this.options.closable) {
this.deactivate();
} else {
return;
}
} else {
this._handleAccordion();
}
Jan 28th 2008
A Horizontal Accordion! (Nested)
pardon my ingles I have a XXX working but when I copy I cosay to have 4 equal panels single works to me first if somebody knows like making this thanks for the aid
this code work:
Aprovisionamiento
1
2
this code not work:
Aprovisionamiento
1
2
Reportes
1
2
Jan 28th 2008
It works! I tested it on my own website on which I’ve it implemented.
Yes you will get a donation.
It looked and moved very crappy when I first used it, then I found out that overflow:hidden;
in the .accordion_content solves it.
You’d better update it and mention it! I bet you knew.
Anyway thanks for your great tutorial and recource.
Jan 29th 2008
Hi Kevin,
what a great script. we’re trying to implement multiple vertical nested accordions, but it doesn’t display properly in IE - the first nested accordion is fine, but all vertical nested accordions after that are showing as open, and the open/close control don’t work. is there a way to make multiple vertical nested accordions work in IE? We’d love to use this tool in future, and would be glad to compensate you for your help!
Thanks in advance!
Jan 30th 2008
Okay, I’m having some issues setting up the accordion. It might be my tiredness, but I think I followed the instructions correctly, and I get this: http://www.studentsagainstterrorism.org/indexacc.htm
How do I fix this? Thanks!
Jan 30th 2008
There is an issue with the resizing of panes using prototype 1.6. Do you know a workaround or what code needs to be updated? Thanks.
Jan 31st 2008
question:
i want to activate or toogle a “accordion_toogle” with an external link. like this:
Link 1
but that will not work… any ideas? Thx for your support…
Jan 31st 2008
oh… i will post the code again.. :
Link 1
Jan 31st 2008
damnd…
bottomAccordion.activate($$(’#vertical_container .accordion_toggle’)[1]);
this line in a “a href onclick…” will not work..
Feb 2nd 2008
I love this Accordian. I’ll definitely be making a donation once I get it all working for me when I update my site.
Does anyone know how to get reflection.js or the mootools version of reflection.js to work on an image inside the Accordian? I tried and cannot figure out why it won’t work. This would really put the icing on the cake for my images if anyone knows - been working on this for three days with no success.
Feb 3rd 2008
The Accordion download seems to be missing some files which are necessary for it to work.
Specifically, these files are missing:
/accordion/css/default.css
/accordion/images/macbook.png
/accordion/index.html
/accordion/javascript/code_highlighter.js
/accordion/javascript/html.js
/accordion/javascript/javascript.js
Feb 6th 2008
New Version of Accordion.js located here..http://www.aughenbaugh.us/accordion2/Index.html
Can do some Ajax within it now.
Added an even for when a tab is Activated.
Comments in Source…
~~~~~~~~~~~~~~~~~~~~~~~~
2-2-2008 Trey Aughenbaugh
made a few updates based on the comments from here.
http://stickmanlabs.com/2007/07/12/accordion-v10-released/#comments
-Updated it to work with new version of Prototype 1.6 and scriptaculous 1.8
-Updated to remove flicker
Added ability to have a callback function.
Useful for making AJAX calls.
Also Added the ability to specifiy which call will get executed each time.
Use the ID sttribute of the DIV for reference. REQUIRED for callback.
Thanks,
Trey Aughenbaugh
Feb 13th 2008
hello,
need a hover effect fot the toogle. mouseover/out or a:hover with bug, the toggleactive no working!!!
Tips??????
Feb 14th 2008
Hi there,
I can’t get the mouseover to work - the panels will only open on ‘click’. Here’s the code I’m using:
var nestedVerticalAccordion = new accordion(’vertical_nested_container’, {
classNames : {
toggle : ‘vertical_accordion_toggle’,
toggleActive : ‘vertical_accordion_toggle_active’,
content : ‘vertical_accordion_content’
},
onEvent : ‘mouseover’
});
Feb 22nd 2008
Evening
As you say, this is the best Accordian out there.
I am using Sharepoint and this is the only Accordian that works within the CEWP (Content Editor Web Part).
Everything works except the vertical nested piece - any ideas why ?
Also, I added jquery and a drag piece - it worked, but the accordian opens up and does not work. Others that I have tried allow the moveable piece, but the acordian collapes - the opposite of yours.
Any ideas would be appreciated.
Iain
Feb 25th 2008
Hi Kevin,
Love the library here, but it doesn’t work with the latest Prototype (1.6). Any plans to update it? I’ve got some other widgets that I would like to use in my latest site that rely on 1.6.
Thanks for putting this out there!
Chris
Feb 25th 2008
I love this script!
Ive had an idea and dont know how to do it, can anyone help please?
I want to fix the vertical accordian (with just one accordian in it) to the bottom of may screen and when activated have the toggle push up revealing the content.
I’m pretty good with css but javascript is new to me.
any help would be appreciated!
Cheers
Feb 26th 2008
This is a great script! But I have a few questions on possibilities.
I’ve got a test page here:
http://www.three6ixty.com/stark/
I’ve set it up so that I’m only using the horizontal accordion and everything seems to be working great. I just have a few features that I would like to add/change and I’m not sure how to do it or if it’s possible.
I would like to be able to apply a different style to each individual horizontal toggle. So each one would be a different color for example.
Also, would it be possible for the links in the nav on the right to open or close a respective horizontal toggle?
Any thoughts? Thanks!
Feb 26th 2008
OK, I figured out how to apply different styles to each individual horizontal toggle. Simply insert a div class into the toggle.
So the only thing I can’t figure out is how to open and close each slider using the menu on the right.
Any thoughts/suggestions are much appreciated!
Thanks.
Feb 27th 2008
Hi. I dont know have you seen this problem but content element is blinking.
To solve this problem I add this strings:
if (this.currentAccordion != this.showAccordion)
this.currentAccordion.setStyle({
height: ‘0px’
});
Mar 2nd 2008
First, thank you for the accordion, great job! Looks very nice and is very useful (would be=D)…I really can’t figure it out but I don’t get it to work on my own site…I even copied my content (means a little text) in your example index.html (this one works if I don’t change anything, but if I change the text it’s not working anymore^^) but there’s nothing moving…I’m talking about this site here…if you have some minutes you may have a look on the code, I would be very greatful for that…sitting on it for hours now =)…but I capitulate now, really don’t know what the **** I’m doing wrong…
thx 4 the script anyways!
regards,
luk
Mar 3rd 2008
Utterlu great script! Just a quick question; when will Prototype 1.6.x be supported? It doesn’t work with that at the moment. Thanks!
Mar 3rd 2008
Just noticed a version supporting Prototype 1.6.x can be found here: http://www.aughenbaugh.us/accordion2/Index.html.
Thanks!!!
Mar 4th 2008
I’ve tried accordition 2.0 with latest version of prototype and script.aculo.us.
There are issues! The Scale effect works only first time, than the content of the menues dissapears.
Mar 17th 2008
Great Job. Just wondering whether it’s possible to have/use multiple “vertical_nested_containers” through the accordion menu?
Based on your example, could you have another new Vertical Nested Accordion option, say below “Changelog”?
If so, how can this be done?
Thanks.
Mar 26th 2008
I also noticed this thing completely breaks if you upgrade scriptaculous to 1.8.1. Any thoughts on this?
Mar 28th 2008
Great script…
But, I too am having issues with removing the nested content. When i remove the horizontal accordion code in the html, it breaks.
What am i missing?
Mar 29th 2008
Jeff,
You need to remove the init script for the horizontal accordion in the sample page; line #39 to #49 in the index.html sample page.
Hope this helps.
Apr 2nd 2008
We are using your Accordian version 2.0. we have copied the A Vertical Nested Accordian block again to create another pop up menu.And its showing perfectly in Mozila Firefox version2 ,But its not properly working in Internet Explorer properly.Plz help us.Thank you
Apr 2nd 2008
oh, i forget … thanks a lots Kevin for this absoluty great accordion !
Apr 5th 2008
Can Accordion 2.0 work with LightWindow? I would like to spawn lightwindows from links within an accordion, but i can’t seem to get it working. Are effects.js and prototype.js for lightwindow different from the same two files used by accordion?
Thanks,
Paul
Apr 18th 2008
Hello,
I am new to javascript I have used the Accordion v2.0 on this site http://www.tokyo1.gr/planatech and it seems to have problems with Firefox and IE. The wierd thing is that on Safari on OSX it works perfectly. Can you help me?
Apr 21st 2008
Hi,
Accordion v2.0 - Great script.
A bug - Open a panel, close it. Open it again. A flicker ? Bug ?
I am using it in one of my projects and will surely give you credit.
Apr 29th 2008
hi,
cant we add a color transition to this, as seen on this page
http://www.solutoire.com/experiments/mootools10/acc_ex3.html
(which is based on mootool)
thanks!
May 1st 2008
flicker issue. I’m guessing people are talking about when onclick() the content of the Div is visible before the header bar moves. I have the same issue. I’ll looking through the code now to see what can be done, but nothing jumps at me.
Thoughts? BTW I did the ‘height:auto’ -> ‘height:’0px’ with no effect.
Ta
May 6th 2008
Hey, fantastic script. One problem though, only got two js files with the download.
May 7th 2008
Hi Kevin,
Thanks for this easy to use and nice looking accordion. I have a question. Is there a way I can put a .swf object inside the accordion? So far I’ve tried with and tags and the .swf (an mp3 player) appears on top of the closed accordion, when I open the accordion, the .swf is at the right height, but when the accordion is closed the .swf can be seen. Any tips would be greatly appreciated.
-Inishi
May 7th 2008
I wrote embed and object tags, it won’t show stuff inside
May 12th 2008
Love the accordio