+ 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🙏
5 Respuestas
+ 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
+ 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....
+ 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
+ 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.
+ 3
Ok, I will try to do code later...
Thanks, guys, for supporting. Arigato, Nikolay-san🙏