title: show preload.gif before image load compelet
body: <p>i have a gallery of images and i want assign  a class name to all image tag ,that before complete load show preload.gif and when image load complete, show image.
  i try with this code :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;script&gt;
        function myFunction() {
          alert("Image loaded: " + document.getElementsById("myImg").complete);
        }
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body onload="myFunction()"&gt;
      &lt;p&gt;This property returns true if the image is finished loaded, and false if not.&lt;/p&gt;
      &lt;img class="myImg" src="compman.gif" alt="Computerman" width="107" height="98"&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>this code support id name but i want assign class name to all images tag </p>