Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8794397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:14:44+00:00 2026-06-13T23:14:44+00:00

With much frustration I managed to get my code nearly working. I want to

  • 0

With much frustration I managed to get my code nearly working. I want to animate a list of transparent png images. Making it look and work like a GIF.

I have 36 images.

1.png
2.png
3.png
..
36.png

However for someone reason my code crashes at the "5.png" – I have added the code and made it 1500ms so you can see the Firebug or what happens. The image exists.

jquery

// M2M Badge
$(function () {
    var i = 1;
    var interval = setInterval(function () {
        $('div.m2m_badge a img').attr({
            src: '//gc-cdn.com/ui/m2m/m/' + i + '.png'
        });
        i++;
        if (i === 36) i = 1; //38 images has been shown, stop the interval
    }, 1500); //50ms between each swap
});

jsfiddle

http://jsfiddle.net/VWyn9/8/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:14:45+00:00Added an answer on June 13, 2026 at 11:14 pm

    Your code works, but may I recommend not using 36 images as it will probably load slowly.

    a good alternative will have a sprite file (one file with all of these images in a row).
    you can then set it as a background image for a div, and change the background position in each iteration to only show one frame of the animation.

    this way you will only load one image (which will be 18 times faster than loading 36 images) and it will definitely work on every single environment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Much of our C# release code is built with the 'Optimize code' option turned
So after much frustration with Janrain's PHP OpenID Library I decided to switch over
I'm having some frustration with the LaTeX tabbing environment. For example, in this code
After much frustration I've finally got an application to run on an iPad without
I didn't want to resort to asking here but after hours of frustration I
Using layouts for me results in so much frustration that I end up using
JAVA: First off, Thanks so much for taking the time to look at my
After much frustration with getting a JFormattedTextField to work with my custom formats, I
RESOLVED After much confusion and frustration, I finally got my hard disk to interrupt.
I've finally found a way to get this to work but the code it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.