Тёмный

How to Create and Display a Loading Spinner on Page Load (without JQuery) - HTML, CSS & JavaScript 

Web Dev Tutorials
Подписаться 15 тыс.
Просмотров 69 тыс.
50% 1

In this tutorial, you'll learn how to create and show a loading spinner until the page has finished loading.
Sponsor me on GitHub!
github.com/sponsors/miguelznunez
Follow my blog:
/ miguelznunez
Email : mignunez@csumb.edu
Medium : / miguelznunez
Codepen : codepen.io/miguelznunez
GitHub : github.com/miguelznunez

Опубликовано:

 

2 авг 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 42   
@yamanonagame
@yamanonagame 11 месяцев назад
Excellent! This is exactly what I wanted to implement. Thanks!
@ajandresiwakwi9882
@ajandresiwakwi9882 11 месяцев назад
this idea was really helpful thank you!
@maykolandres9280
@maykolandres9280 Год назад
Thanks bro, it really helped me!
@ahmedhemdan707
@ahmedhemdan707 Год назад
Very simple and helpful thanks
@lyricspower123
@lyricspower123 Год назад
thanks man! this video is very helpful
@anondz2382
@anondz2382 3 месяца назад
Bro you helped me a lot , thank you
@developershub2024
@developershub2024 Месяц назад
Thank you so much, very helpful content. i will implement this in my Django project!!
@kamranbayramov8169
@kamranbayramov8169 2 месяца назад
thanks man short and useful
@matuscesnak6299
@matuscesnak6299 4 месяца назад
Bro, you dont know how much you helped me!!! thanks
@developershub2024
@developershub2024 Месяц назад
Not only you, even me too!
@John-wx3zn
@John-wx3zn 11 месяцев назад
Thank you. I found that useful.
@iGustavoMaster
@iGustavoMaster 2 месяца назад
Thanks bro, Excellent !
@cedriic0
@cedriic0 Год назад
Thanks bro, you helped me out
@sheikhfarid9715
@sheikhfarid9715 Год назад
Thanks Man ❤️
@VanyaSkeedan
@VanyaSkeedan Год назад
Brooooo Thank you, bro Very cool 😎
@asalihab
@asalihab Год назад
That's great, thank you
@benjaminaRandriantsoa
@benjaminaRandriantsoa 18 дней назад
Thanks bro
@Melissa-mo2mr
@Melissa-mo2mr 8 месяцев назад
what editor you using ? vs code editor or ?
@raeesshahsani
@raeesshahsani Год назад
Hey there, the code is perfectly working, except for the statement where it is mentioned, document.body.removeChild("loader"); The browser would throw error: Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
@ChrisWalshZX
@ChrisWalshZX 7 месяцев назад
Don't you need the spinner to appear when "leaving" a page as by the time the new page has started to load in and the "load" event has fired, you've already done most of the waiting? For a web portal, we need to sometimes do timely operations getting data prior to presenting the page (document) to the browser. Let me know what you think. Thanks.
@leonardflores6218
@leonardflores6218 Год назад
Thanks
@ChrisWalshZX
@ChrisWalshZX 7 месяцев назад
5:40 The removeChild() parameter shouldn't be in quotes. You are removing the DOM element, but a string that happens to have the same name.
@TheHassankhattab
@TheHassankhattab 2 месяца назад
Thank you so much. I'm not a coder, where can I find the source code of this?
@user-jz6lv9wy5t
@user-jz6lv9wy5t 6 месяцев назад
where is the link to the project with that code in git ? I could not find it via its git repo
@alalyrealestate1136
@alalyrealestate1136 10 месяцев назад
thank you bro .. How to add it while sending form data to record it in mysql database via php script
@ranzethan
@ranzethan 2 месяца назад
how do i set the loading time? because mine lasts very quickly
@kortisnet2315
@kortisnet2315 9 месяцев назад
loader--hidden is giving console error Uncaught TypeError: Cannot read properties of null (reading 'classList')
@popeyee_7877
@popeyee_7877 9 месяцев назад
Can you show how I can put an image in the circle?
@geextrix1538
@geextrix1538 Год назад
I keep getting errors on document.body.removeChild("loader"). Put my loader right after body and used this document.body.removeChild(document.body.firstChild). Great tut, btw.
@TECHMAAPLUS
@TECHMAAPLUS 9 месяцев назад
nice😀😀😀😀😀😀😀
@johnnyvlee
@johnnyvlee 6 месяцев назад
Just a suggestion but a link to a working codepen would have been really helpful
@Manucraft98
@Manucraft98 Год назад
Cool man thanks
@codefoxx
@codefoxx Год назад
No problem! and are you referring to lazy loading images?
@Manucraft98
@Manucraft98 Год назад
@@codefoxx yeah, both lazy loading and skeleton loading (css) as a temporary replacement. That would be great!
@MarkcDuke
@MarkcDuke 8 месяцев назад
Can you help out My loader isn’t removing from the screen
@septionugroho2366
@septionugroho2366 5 месяцев назад
same here, still spinning till now 🥲
@kyleryxn
@kyleryxn Год назад
Doesn't work me for, the loader appears as soon as the first page loads, without me clicking a link. Full source code wold help
@etsnr05
@etsnr05 Год назад
that's the purpose of it, to work when any page loads
@RCshiat
@RCshiat Год назад
For anyone getting an error, just replace "document.body.removeChild("loader");" with "loader.remove();".
@jerrytonmoy
@jerrytonmoy Год назад
You are right brother
@mouloudjmohamed5116
@mouloudjmohamed5116 8 месяцев назад
Ye bcuz removeChild accept node👍
Далее
How To Create Skeleton Loading Animation With CSS
9:59
Use Spinner and Create Page Loader in Bootstrap 5
8:23
Add Preloader HTML CSS & Javascript
9:58
Просмотров 38 тыс.
Color Changing Shiny Loader using HTML & CSS
4:32
Просмотров 74 тыс.
BREAKING: jQuery V4 Is Here (YES REALLY)
12:30
Просмотров 183 тыс.