C
C
Captain Cocoa2015-09-03 12:27:22
Python
Captain Cocoa, 2015-09-03 12:27:22

How to change class on page scroll?

Hello everyone, for example, there is such a design.
The menu is fixed, how to make it so that when the site is scrolled, say by 300px, the scroll class is added to the
menu. Well, the class will be assigned a different text color in the menu.

And when scrolling back, the class was removed.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
hellmarine, 2019-03-24
@hellmarine

I can advise you to select a piece of code in NPP with tabs and press shift + tab

5
5am, 2019-03-24
​​@5am

To convert existing tabs to spaces, press Edit->Blank Operations->TAB to Space.
If in the future you want to enter spaces instead of tab when you press tab key:
Go to Settings->Preferences...->Language (since version 7.1) or Settings->Preferences...->Tab Settings (previous versions )
Check Replace by space
https://stackoverflow.com/questions/455037/convert...

V
Vitaly Inchin ☢, 2015-09-03
@RadCor

This question appears here more often than rabbits breed. Use search.
Ps: Here, I wrote, for example: How to make a block appear on scroll?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question