Stop gif animation JavaScript

Blog/JavaScript · 2014-06-19 · gifffer, image, library

This blog has 460 posts. In some of them, I need to show video clips demonstrating some feature or browser behaviour. I found that it was much better to do that in an animated Gif. However, they play automatically which is kinda annoying. Imagine that we have ten Gifs on the page and while you are reading they all blink or show moving content. It's like having a page full with banners.

The solution

I ended up with fairly simple solution. To be more accurate - 1.5K JavaScript library called Gifffer. It has only one simple task. It should replace my

At the end, call Gifffer[] whenever you want. For example:

window.onload = function[] { Gifffer[]; }

Download

The library is available at GitHub here. The file that you need is gifffer.min.js.

Video liên quan

Chủ Đề