Download image using jquery
<p>in my form load i download a image using jquery and when user click on any button then i am showing that image in my div. but only first time image is taking time to visible. if image is downloaded at form load so when i am showing that image through jquery then i think it should not download again and it should be visible very quickly.</p>

<h2>here is my code</h2>

<pre><code> var _images = ['/Images/ajax-loader.gif'];
   $.each(_images, function (e) {
       $(new Image()).load(function () {
           //alert($(this).attr('src') + 'has loaded!');
       }).attr('src', this);
   });
</code></pre>

<p>through the above routine i am downloading image at form load with the help of jquery.</p>

<p>so when i am showing that image when user click on button like below one</p>

<pre><code>                   $('#loader').html('&lt;table border="0" style="width:auto"&gt;&lt;tr&gt;&lt;td valign="middle"&gt;Wait...&lt;/td&gt;&lt;td valign="top"&gt;&lt;img height="20px" width="20px" src="/images/ajax-loader.gif" border="0" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;');
</code></pre>

<p>loader is my div</p>

<p>so the image should not download again rather it should show from the client machine.
so please guide me what is wrong in my code that image is download at form load and inspite of that it is again loading for the first time. please help...thanks</p>
