Solved

gif animation

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

Thanks.
0
Comment
Question by:Perumal_RM
[X]
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
6 Comments
 
LVL 82

Accepted Solution

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

Open in new window

0
 
LVL 82

Expert Comment

by:leakim971
ID: 41900008
0
 

Author Comment

by:Perumal_RM
ID: 41900534
Hi leakim971,

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

https://www.telstra.com.au/deals

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.
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
LVL 82

Expert Comment

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

Author Comment

by:Perumal_RM
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.
0
 
LVL 82

Assisted Solution

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
formvalidation.io validate form on class click 4 37
Make check boxes work 8 46
Link Anchor Not working 9 49
Keyup listener getting fired on initial page load 1 16
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

733 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