0

On the website that I am developing there is a gif. Gif is loaded when moving from one page to another, the code is like this

<div class="loader-wrap">
        <img src="<?php echo base_url('assets/img/matoa-preloader.gif'); ?>">
      </div>

i use javascript to limit the time like this

//untuk loading page
        $(function() {
            $(".loader-wrap").fadeOut(2000, function() {
                $(".content").fadeIn(1000);        
            });
        });​

the gif is to long, how can i limit to play the gif just for 2 second?

smt
  • 267
  • 6
  • 22
Misdan
  • 149
  • 1
  • 5
  • 15
  • Possible duplicate of [Stopping GIF Animation Programmatically](https://stackoverflow.com/questions/3688460/stopping-gif-animation-programmatically) – Obsidian Age May 15 '19 at 02:31

1 Answers1

0

There is no way to do this in PHP. This is a front-end issue, not a backend issue. You can use this link to cut down the duration of the gif and replace the old gif.