[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


gif animation

Posted on 2016-11-23
Medium Priority
Last Modified: 2016-11-28
Hi, is there a way in jquery to find if a GIF has played completely?

Question by:Perumal_RM
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 82

Accepted Solution

leakim971 earned 2000 total points
ID: 41899954
$("#gifID").load(function() {
       setTimeout(function() {
        }, 4000); // the gif finish after 4s

Open in new window

LVL 82

Expert Comment

ID: 41900008

Author Comment

ID: 41900534
Hi leakim971,

thank you for a solution. I have tried using your code in my page.


my gift wrapper image gif, before it completes/loads shows the content below it. I can not figure out why. My wrapper image id is #gifIDmbl.

any help or thoughts please?

issue mainly happens in small screen devices. before the animation loads and played completely, the layer behind shows up.

Current animation duration is 5000 ms.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 82

Expert Comment

ID: 41900557
your GIFs are really too big... 1,6min to load the page !!!
too big

Author Comment

ID: 41900598
Hi leakim971,

thanks for that. I have removed that gif which took long time to load. anything else, do you think could be affecting?

thanks a lot in advance.
LVL 82

Assisted Solution

leakim971 earned 2000 total points
ID: 41900600
we've two GIF like that : 7,7MB and 4.1MB is too much too

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question