I have a list of products, and in each li element with jquery I want to show the image in the attribute data-thumb in the img within in the li element. i.e. set the value of img src to the value of data-thumb in each li element, but while it is loading I want to show ajax-loader.gif that is already there. Could someone lead me in the right direction?
example:
<li data-id="7" data-thumb="http://test.com/assets/pdc/thumbs/66.png" data-img="http://test.com/assets/pdc/img/66.png" data-country="Australia" data-company="Big Farm" data-app="Tea" data-brand="Big Farm" data-package="500" class="product air-500 cat7">
<img class="tip" data-country="Australia" data-brand="Big Farm" src="assets/img/ajax-loader.gif">
</li>
Thanks!