JS-NINJA!🎎 I NEED YOU!🈶🈷🈴 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

JS-NINJA!🎎 I NEED YOU!🈶🈷🈴

I need a help with my code preview photoalbum. How can I implement my animation with js on loading the page? Thanks for supporting☺ Domo arigato🙏

7th Aug 2017, 1:53 PM
Вап
5 Answers
+ 14
https://www.w3schools.com/howto/howto_css_loader.asp then remove the loader class from the div in window.onload() just make sure you put the loading of scrips and any AJAX calls at the end of the HTML to make sure the div is displayed and the css is applied :D
7th Aug 2017, 2:04 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 12
@4rontender - I can't quite understand what are you trying to do. A sample code would help a lot, something simple to demonstrate what you have done and to help us understand what you want to achieve....
7th Aug 2017, 2:26 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 5
You cannot display anything while html is parsing... so, you have to first wait for at least 'DOMContentLoaded' event of 'document' (you could also use 'onload' on 'window' or 'body' elements -- same event -- but DOMContentLoaded is first fired, as soon as parsing file is ended, while 'onload' is only fired when all linked ressources are loaded/parsed ^^). Next, how implement your animation is mostly related to what kind of animation you want to do ;P
7th Aug 2017, 2:04 PM
visph
visph - avatar
+ 4
@Nikolay Thanks☺ But I just didn't want to transform the central photo to loader. I don't understand how to make animations of all photo with js and further acts.
7th Aug 2017, 2:08 PM
Вап
+ 3
Ok, I will try to do code later... Thanks, guys, for supporting. Arigato, Nikolay-san🙏
7th Aug 2017, 2:30 PM
Вап