accordion help

This is a discussion on "accordion help" within the JavaScript Forum section. This forum, and the thread "accordion help are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 10th, 2007, 14:38
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 27
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
accordion help

I have the following site

link

I am trying to keep the accordion closed on start up, how can i get this? tried to mess about but no joy.

here is the javascript
Code: Select all
// Defines the Accordion

function AccordionInit() {



	var accTitle = $$('.menuTitle');

	var accContent = $$('.content');

	var pwAccordion = new Accordion(

		accTitle, accContent, {

		

			onActive: function(tog){

				tog.addClass('selected');

				var accTitleOnOff = new Fx.Styles(tog, {wait: false, duration: 350});

				accTitleOnOff.start({

					'background-color': '#adc96d',

					'color': '#dce6b2',

					'border-bottom-color': '#adc9ff',

					'padding-left': 6

				});

			},



			onBackground: function(tog){

				tog.removeClass('selected');

				var accTitleOnOff = new Fx.Styles(tog, {wait: false, duration: 350});

				accTitleOnOff.start({

					'background-color': '#f2f2f2',

					'color': '#2f3d31',

					'border-bottom-color': '#ddd',

					'padding-left': 0

				});

			},

		

			alwaysHide: true,

			duration: 500

		}

	);



	// Mouse effects

	accTitle.each(function(div) {    

		var mouseFxs = new Fx.Styles(div, {duration: 250, wait: false});

		div.addEvents({

			'mouseover': function(){

				if (!div.hasClass('selected')) {

					mouseFxs.start({

						'background-color': '#adc96d',

						'color': '#0094d3',

						'border-bottom-color': '#E5E5CC',

						'padding-left': 6

					});

				}

			},

			'mouseout': function(){

				if (!div.hasClass('selected')) {

					mouseFxs.start({

						'background-color': '#f2f2f2',

						'color': '#2f3d31',

						'border-bottom-color': '#ddd',

						'padding-left': 0

					});

				}

			}

		});

	});

}



window.addEvent('domready', function(){

	AccordionInit();

});

thanks in advance
Reply With Quote

Reply

Tags
accordion mootools

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MooTools Accordion Advanced Ed JavaScript Forum 6 Dec 31st, 2007 18:01
MooTools - Accordion Ed JavaScript Forum 25 Nov 8th, 2007 00:11


All times are GMT. The time now is 23:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43