Alex Rivera | Logout

Is there a way of syncing gif files?

Asked 2012-10-12T14:35:48.590
9

I have a page with 7 gif files on it.

Is there a way to sync them all, so they start playing at the same time?

I was thinking of preloading them, but still they may not start synced if one takes longer to load than another.

Edit
Report

1 Answer

16

As @Archer pointed out above, one way to do it is to preload them then reset the src. Using jquery you could do something like:

$(window).load(function() {
    $('.preload').attr('src', function(i,a){
        $(this).attr('src','').removeClass('preload').attr('src',a);
    });
});

See it on jsfiddle.

answered 2012-10-12T15:41:25.237

Your Answer