title: jQuery performance, .css or addClass
body: <p>I have a big jQuery code and I am thinking at speed performance of my functions. When an element is clicked (mousedown) i need to assign an image as background. I can do this by 2 ways:</p>
  
  <pre><code>$('#element li.class').css({"background":"someimageURL"});
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$('#element li.class').addClass("someclass");
  </code></pre>
  
  <p>where "someclass" have the actual CSS background image.
  Witch function works better in this case.</p>
  
  <p>Is there a way to test various functions speed?</p>
  
  <p>Thank you</p>