Тёмный

Vanilla JavaScript Slide In on Scroll -  

Wes Bos
Подписаться 178 тыс.
Просмотров 47 тыс.
50% 1

Today we learn how to use the scroll event to detect when a nav should be fixed.

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

 

4 сен 2017

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 63   
@Poohbify
@Poohbify 6 лет назад
I like these a lot. Saves myself time and frustration.
@nomdplume6166
@nomdplume6166 6 лет назад
Thanks for making this! Super useful and well done.
@markday3145
@markday3145 6 лет назад
Thanks for the series! Having real-world homework helps me hone my skills better. Once I knew what you were going for, I coded it up a little differently. I went for variables to represent the important offsets in the window and image, then did simple comparisons between them. Seemed more readable to me.
@chandrabhan3501
@chandrabhan3501 6 лет назад
Awesome dude
@danbuild977
@danbuild977 6 лет назад
Hi Brilliant Tutorials as always.I noticed that you use the .'sliderImage' variable quite heavily.
@flamethrower883
@flamethrower883 2 года назад
Great exercise. I personally don't like the feature of removing the active class when the user scrolled past the image, so I did not include it in my solution. But, to each their own.
@NikolaZagorac
@NikolaZagorac 5 лет назад
Thanks!
@san_tient
@san_tient 5 лет назад
its hard to imagine numbers.. you have to console log to understand values of variables if dealing with numbers
@user-jq3sz4hg6k
@user-jq3sz4hg6k 5 лет назад
Now Wes Bos, finally tell us what the music is playing at the beginning.
@thomasprior5713
@thomasprior5713 4 года назад
Awesome video. What would I do if I wanted to slide in paragraphs or whole divs?
@kamransiddique9311
@kamransiddique9311 5 лет назад
I also want to add effects to text, so how I have to code.
@vergilkelley901
@vergilkelley901 4 года назад
I can console log the scrollY but I cant get any console logs to show after sliderImages.forEach(sliderImage => {
@scriptskillz
@scriptskillz 4 года назад
Any reason not to use intersection observer instead?
@sateeshbharti
@sateeshbharti 3 года назад
Is there a draw back to writing the function like this:
@eh-lo2do
@eh-lo2do 4 года назад
what about getBoundingClientRect() ?
@horoman
@horoman 6 лет назад
Hey Wes Bos the quality of the video looks too much compressed
@lardosian
@lardosian 6 лет назад
How many years experience would be required to be expected to be able to write that debounce function, thanks.
@vergilkelley901
@vergilkelley901 4 года назад
also can you show the html? Im not sure I have all of the classes attached to the correct elements because its not working.
@strxangxl
@strxangxl 4 года назад
Have you used pure js or any js Library or something help please tell?
@bluex217
@bluex217 3 года назад
stuck getting this to work as offsetTop is undefined
Далее
Ajax Type Ahead with fetch() - #JavaScript30 6/30
17:22
кажется, началось
00:45
Просмотров 1,6 млн
Vanilla JavaScript Sticky Nav - #JavaScript30 24/30
10:02
Subtle, yet Beautiful Scroll Animations
5:04
Просмотров 1,6 млн
The Story of Next.js
12:13
Просмотров 559 тыс.
The JavaScript Survival Guide
14:47
Просмотров 722 тыс.
кажется, началось
00:45
Просмотров 1,6 млн