PDA

View Full Version : JQuery Help | Accordion Menu



Android-Does
15 Oct 2010, 06:10 PM
Hello -

I am designing an art website for a client. She would like the website's accordion navigation to stay open when a user clicks on a sub link and for the color of the link to change while the user is in that particular page.

I have never worked with JQuery.

Here is the website for your reference: http://dev.cpworks.org/v01/index-v1.php

Thank you for your help. Cheers.

Here is the JQuery Code for the Accordion:

[QUOTE]window.addEvent('domready', function() {

//create our Accordion instance
var myAccordion = new Accordion($('accordion'), '.toggler', '.element', {
opacity: false,
alwaysHide: true,
start:'all-closed',
onActive: function(toggler, element){
//toggler.setStyle('color', '#41464D');
toggler.addClass('active');
},
onBackground: function(toggler, element){
//toggler.setStyle('color', '#528CE0');
toggler.removeClass('active');
}
});

var goalAccordian = new Accordion($('accordion'), '.goal-toggler', '.goal-element', {
opacity: true,
start:'all-closed',

alwaysHide: true,
onActive: function(toggler, element){
toggler.addClass('active');


},
onBackground: function(toggler, element){
toggler.removeClass('active');

}
});

var profileAccordian = new Accordion($('accordion'), '.profile-tab', '.profile-element', {
opacity: true,


alwaysHide: true,
onActive: function(toggler, element){
toggler.addClass('active');


},
onBackground: function(toggler, element){
toggler.removeClass('active');

}
});


});
[QUOTE]