Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-29-2009, 12:46 PM   PM User | #1
ktsixit
Regular Coder

 
Join Date: Sep 2008
Posts: 106
Thanks: 27
Thanked 3 Times in 3 Posts
ktsixit is an unknown quantity at this point
simple mootools accordion with hover effect

Hi all,
I'm trying to customize the mootools accordion demo (http://demos.mootools.net/Accordion). I'm trying to add a mouseover effect on the togglers. I'd like them to change their background color on mouse over. Could you help me a little?

This is the javascript code:
Code:
 window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'div.toggler', 'div.element', {
		opacity: false,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#41464D');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#528CE0');
		}
	});
});
I tried to add something like:
Code:
$('div.toggler').addEvent('mouseover', function(){
 			toggler.setStyle('background-color', '#000000');
 	});
but didn't work

Last edited by ktsixit; 05-29-2009 at 01:12 PM..
ktsixit is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 06:45 AM.


Advertisement
Log in to turn off these ads.