Showing loading gif over image

ever1zero

New Member
I am making a website where by clicking on a next button, the browser requests a new image URL from the server and loads the image using jQuery. I want to show the loading image on top of the old image when the request happened (like Facebook).HTML\[code\]<div1> <img id="rel" src="http://localhost/images/original.jpg" height="400" width="500"></img> <div2> <img id="rel" src="http://localhost/images/loading.jpg" height="40" width="50"></img> </div2></div1>\[/code\]CSS\[code\]div1{ position:relative;}div2{ position:absolute; top:50%; left:50%;}\[/code\]When I try this in jsFiddle the image does not appear over the other image. I only know basic CSS. Forgive any blunders in the above code.
 
Back
Top