View Full Version : Regarding Jquery Issue for GIF Images

05-23-2013, 03:21 AM
Dear All,

Here is my site www.techwork.com.au/index.php/

Please see the top banners working fine but the thing is 2 images are GIF images & only first one working fine.
Images are rotating but only truck like image comes in animation but another image do not come in animated way.

Any help please?


05-23-2013, 04:15 AM
I am using firefox 21.0 and I see a truck that goes right to left anf then an banner for cat cables that loads next.Then they continue to alternate.

05-23-2013, 04:24 AM
You cannot animate animated GIF images, especially not when there's another ongoing javascript animation on the page. It's just too much for most, if not all browsers to handle.

05-23-2013, 05:28 AM
Dear ajfmrf & jscheuer1,

Thank you for your answers. :)

So now what I need is.....I need to make cable image same like truck image right? (A continuous animation). Right?


05-23-2013, 12:45 PM
What's a cable image?

In any case it would help to understand that javascript animation is one of the most taxing things you can ask a browser to do. If you also have Flash animation, or a Flash movie or HTML 5 video on the page, it makes things more difficult. If you add a second javascript animation, that makes things more difficult. If you also have animated GIF on the page, that's usually even more difficult than adding Flash, HTML 5 video or another javascript animation.

And it helps to understand that the more things that are moving around on a web page, the more likely that the visitor will feel disoriented and not want to be on that web page.

Because of these facts, animation, whether Flash, HTML 5 video, animated GIF, or javascript, is usually confined to one feature per page. I have seen cleverly designed pages that have 3 different types of animation on the page, but because they happen at different times, only one is generally using the browser's resources at any given moment. Even then the page is disorienting and many people would choose to stop looking at it because of that.

What might work because your second javascript animation on the page goes in steps, would be to have the banners be static GIF images and to have them either slide in or fade in also in steps, and just make sure the steps for the banner animation happen at a different time than the steps for the product animation. It would still be distracting to the average user.

Another thing you could do is, once again have the GIF images be static and just have the page use javascript to pick one at random to be the banner each time the page loads. Or use a javascript cookie to alternate them. If the banner also appears on other pages, then you could have different banners for each page. But the animated GIF images, if used at all, should only be used on pages without other animations on them.

BTW, after reading what ajfmr typed, I also checked in Firefox. It was doing a remarkably good job of animating those animated GIF images, and things looked pretty smooth, if a bit distracting. The only odd thing was, the second animated GIF image didn't animate. It appeared only as the last panel of its animation, as if it were a static image. I think that's because it had already fully loaded and played by the time it was animated in by javascript.

05-24-2013, 03:46 AM
Thanks Js.,

For giving me an in-depth knowledge of this animation. :)
Thank you again.