title: loading images via ajax call and meanwhile show loader image
body: <p>just starting to learn the Ajax() function within jquery. trying to make a widget where image loader will appear until the images are loaded from server.</p>
  
  <p>I want to apply the same for all the images comes in these li's.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;style type="text/css"&gt;
      li { padding: 10px; }
      ul.imageList li .pics { height: 50px; width:50px; }
  &lt;/style&gt;
  &lt;script type="text/javascript" language="javascript" src="jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      $('document').ready(function() {
          $('#click').click(function(event) {
              event.preventDefault();
              $(".imageList li").html('&lt;img src="http://deltaplanveter.ru/app/webroot/img/loader.gif" /&gt;');
              $(".imageList li").load('1.png');
          });
      });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div class="images"&gt;
      &lt;ul class="imageList"&gt;
          &lt;li&gt;&lt;img src="1.png" class="pics" /&gt;&lt;/li&gt;
          &lt;li&gt;&lt;img src="2.png" class="pics" /&gt;&lt;/li&gt;
          &lt;li&gt;&lt;img src="3.png" class="pics" /&gt;&lt;/li&gt;
          &lt;li&gt;&lt;img src="4.png" class="pics" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;a href="#" id="click"&gt;Show Images&lt;/a&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Please check my live code here
  <a href="http://jsfiddle.net/ylokesh/cZ6F7/" rel="nofollow">http://jsfiddle.net/ylokesh/cZ6F7/</a></p>
  
  <p>Thanks !
  Lokesh Yadav</p>