2

I got problem with my loader. I am a young graphic designer I was doing research to create a loader with codes. I have everything for now but the problem is that I would like my charger to be seen and not be instantaneous I share with you my code that I used the JS code:

jQuery(window).load(function(){
  jQuery('#loading').fadeOut();
});

Thanks guys for kindly helping me have a good day !

JoSSte
  • 2,953
  • 6
  • 34
  • 54
Kuzs
  • 21
  • 1

2 Answers2

1

The .fadeOut() function has a speed of 400 milliseconds by default. This means the fade animation (visible -> invisible) will take 0.4 seconds.

If you want the animation to take more time, you can simply add your desired duration (in milliseconds) as an integer as first parameter for .fadeOut() function.

.fadeOut(1500) <-- this will increase the animation duration to 1.5 seconds.

You can find more details in jQuery documentation

JoSSte
  • 2,953
  • 6
  • 34
  • 54
Alex Berger
  • 1,357
  • 1
  • 10
  • 22
1

Add delay & increase number value

$("#loading").delay(7000).fadeOut("slow");
Satish Modha
  • 759
  • 1
  • 4
  • 8