for one element you could do:
el.setStyle('font-size', el.getStyle('font-size').toInt() - 1);
Since you're using $$ you're working with a collection of elements, so you
need to loop over them, for example with .each:
$$('ul.menu').each(function(el){
el.setStyle('font-size', el.getStyle('font-size').toInt() - 1);
});
In case $$('ul.menu') only has one element, you can use var el =
$E('ul.menu'); instead to get that element. (note: in >= 1.2 that's
document.getElement)
On Mon, Feb 14, 2011 at 12:56 PM, el3ment <[email protected]> wrote:
> it's working - thanks a lot!
> i misunderstood the encapsulation.
>
> now my code looks like this
>
> var list = $$('ul.menu li').filter(function(el){
> return !(el.hasClass('parent') && el.hasClass('active')) && !
> el.hasClass('item33') && !el.hasClass('item34') && !
> el.hasClass('item35');
> });
>
>
> i still have another question - i want to increase the current
> fontsize by one +1px .
> with [var current_fontsize = $$('ul.menu').getStyle('font-size'); ] i
> get the current fontsize but how do I increase this value by 1px?