someEl.setStyles({
'float': a,
'margin-top': this.closeDimensions[s].height + 'px',
//property is missing here
'padding' + a.capitalize() = this.border + 'px'
});
the property name is missing in the last line
On Fri, Apr 17, 2009 at 3:09 PM, keif <[email protected]> wrote:
>
> I'm porting a function from prototype, and something the original
> author does (that seems to break in MooTools) is do:
> style = $extend({
> "float": a,
> marginTop: this.closeDimensions[s].height + 'px'
> }
> style["padding" + a.capitalize()] = this.border + 'px';
> someEl.setStyle({style});
>
> so MooTools chokes on using an object to set the styles - I *am*
> converting setStyle to setStyles({style}), and broke it down to:
>
> someEl.setStyles({
> 'float': a,
> 'margin-top': this.closeDimensions[s].height + 'px',
> 'padding' + a.capitalize() = this.border + 'px'
> });
>
> and it throws an error on the third style saying it's missing a ':'
> after the property ID.
>
> Any ideas? TIA.
--
fax : (+33) 08 26 51 94 51