title: jquery dynamic class name update doing image delay
body: <p>Inside a page I am having a TR on which when user click it change it's color to blue and arrow color to white. This is achieved by changing elements' class dynamically.</p>
  
  <p>But due to this what happen is, when user click on TR user saw image loading delay. How to preload that CSS image.</p>
  
  <pre><code>this.className = this.className + " active";
  </code></pre>
  
  <p>CSS</p>
  
  <pre><code>.table td.arrow div {background-image:url("../stuff/arrow.png");}  
  tr.active td.arrow div { background-image:
  url("../stuff/arrow_active.png"); }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ZmroD.jpg" alt="Image"></p>
  
  <p><strong>Update</strong>
  One more thing want to update that static content is getting loaded from other server.</p>