Ok in this case I ONLY focus on speed.
What is faster?
$('#header').css({'background':'#ff0000','width':'100px','height':'100px'});$('#header').addClass('header');- Just use #header in css
I can't get the answer by using FireBug.
Just use Embedded CSS, that is #header in css on our page. If you try to apply CSS using JavaScript, your page may not display correctly if JavaScript on browser is disabled. You may use external CSS file, embedded css on head and the inline CSS.
Always give priority to pure HTML and CSS. Trust me, its faster.
addClass()will be faster thancss(), jsperf