Change your selector to: var list = $$('ul.menu li.parent.active');
On Sat, Feb 12, 2011 at 7:43 PM, el3ment <[email protected]> wrote:
> hello guys,
>
> i just starting to learn mootools. on my first "project" i have some
> problems... my script:
>
> window.addEvent('domready', function(){
> var current_menu_style = $$('ul.menu').getStyle('font-size');
> var list = $$('ul.menu li');
>
> list.each(function(element) {
> var fx = new Fx.Styles(element, {duration:250,
> wait:false});
> element.addEvent('mouseenter', function(){
> fx.start({
> 'padding-left': 5,
> 'font-size': '14px'
> });
> });
>
> element.addEvent('mouseleave', function(){
> fx.start({
> 'padding-left': 0,
> 'font-size': current_menu_style
> });
> });
>
> });
> });
>
>
> In [var list = $$('ul.menu li')] i want to sort out elements which has
> class 'parent' AND ALSO 'active'.
> How does this work?