David schrieb:
> Hello everyone,
>
> There is a thought that's flowing through my head for a few days. At 
> work I did a autocomplete plugin. To style the suggestbox and the 
> content I used a variable to fill the style attribute. Then it hit me 
> many plugins use css to style their added elements.
>
> My question is, why use static css if it is useless when javascript 
> isn't enabled? Isn't it better practice to include the css styles in the 
> javascript code to keep the css files as clean as possible?
>
> I hope to get some feedback on this so i can make an article out of it.
>   
The best approach may be to load an additional stylesheet only when 
necessary. That allows you to define your styles in the most natural 
way, avoid tons of inline styles. The latter may not be obvious, but 
could cause serious performance problems.

-- 
Jörn Zaefferer

http://bassistance.de


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to