gif animation

Hi, is there a way in jquery to find if a GIF has played completely?

Thanks.
Perumal_RMAsked:
Who is Participating?
 
leakim971Connect With a Mentor PluritechnicianCommented:
$("#gifID").load(function() {
       setTimeout(function() {
                  alert("done");
        }, 4000); // the gif finish after 4s
});

Open in new window

0
 
leakim971PluritechnicianCommented:
0
 
Perumal_RMAuthor Commented:
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
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
leakim971PluritechnicianCommented:
your GIFs are really too big... 1,6min to load the page !!!
too big
0
 
Perumal_RMAuthor Commented:
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
 
leakim971Connect With a Mentor PluritechnicianCommented:
we've two GIF like that : 7,7MB and 4.1MB is too much too
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.