This simply doesn't work. It acts the same way.
I give each accordian a unique id like <div id="accordion1"> and <div
id="accordion2">.
In my accordian.js I previously had:
//create our Accordion instance
var myAccordion = new Accordion($('accordion'), 'h3.toggler',
'div.element', {
onActive: function(toggler, element) { toggler.setStyle('color',
'#41464D'); },
onBackground: function(toggler, element) { toggler.setStyle('color',
'#528CE0'); }
});
I changed it to below with the second instance:
//create our Accordion instance
var myAccordion1 = new Accordion($('accordion1'), 'h3.toggler',
'div.element', {
onActive: function(toggler, element) { toggler.setStyle('color',
'#41464D'); },
onBackground: function(toggler, element) { toggler.setStyle('color',
'#528CE0'); }
});
//create our Accordion instance
var myAccordion2 = new Accordion($('accordion2'), 'h3.toggler',
'div.element', {
onActive: function(toggler, element) { toggler.setStyle('color',
'#41464D'); },
onBackground: function(toggler, element) { toggler.setStyle('color',
'#528CE0'); }
});
At the bottom of accordian.js I have:
// add the section to our myAccordion using the addSection method
myAccordion1.addSection(toggler, content, position);
I also tried adding
myAccordion2.addSection(toggler, content, position);
Nothing changes. Any ides?
On Oct 16, 6:10 am, Basheer Al-mansour <[EMAIL PROTECTED]> wrote:
> man! you have to call the class 3 times !!
> like that
>
> var accordion1 = new Accordion('h3.atStart', 'div.atStart', {
>
> }, $('accordion1div'));
>
> var accordion2 = new Accordion('h3.atStart', 'div.atStart', {
>
> }, $('accordion2div'));
>
> var accordion3 = new Accordion('h3.atStart', 'div.atStart', {
>
> }, $('accordion3div'));
>
> and to give 3 ides in according !!
> thanx !