Animation is difficult with GIF images due to white borders on text and other pixelation and dithering issues. So I have decided despite the lack of support for PNG on IE especially fadeIn
or fadeOut
jQuery effects on PNG causing black borders to do it.
I have a folder like
/cdn.com/ui/photo/1.png
/cdn.com/ui/photo/2.png
/cdn.com/ui/photo/3.png
This is my HTML code, is there anway to add a delay or somehow loop and change the source of say 1-38 and keep looping it - maybe even customize the delay? I just want it to keep looping smoothly like a fully load gif..
<div class="m2m_badge">
<a href="#"><img src="///cdn.com/ui/photo/1.png"/></a>
</div>
This is my jQuery
$(function()
{
var i = 0;
var interval = setInterval(function()
{
$('div.m2m_badge a img').attr({ src: '//gc-cdn.com/ui/m2m/' + i + '.png' });
i++;
if(i === 38)
clearInterval(interval);
}, 250);
});