-------- Original-Nachricht --------
Datum: Wed, 22 Nov 2006 09:14:41 -0700
Von: Erin Doak <[EMAIL PROTECTED]>
An: "jQuery Discussion." <[email protected]>
Betreff: Re: [jQuery] Animate question
> The animateStyle plugin doesn't seem to work in
> Safari. Is this permanent or are you working on a
> fix?
>
> I do like the effects in FF though and would like to see it work in
> Safari.
Yeah, it's really a great plugin.
Just noted one thing:
The code to specify the color-name-rgb-value mappings could be much smaller by
simply defining it an as object.
Instead of:
switch(cColor) {
case 'aqua':
return [0,255,255];
break;
case 'azure':
return [240,255,255];
break;
...
default:
return [0,0,0];
break;
}
Just write:
var colors = {
'aqua': [0,255,255],
'azure': [240,255,255],
...
};
return colors[cColor] || [0,0,0];
And you can define that color object elsewhere for (maybe) better performance.
--
Jörn Zaefferer
http://bassistance.de
--
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/