Conforms to Scroll and apply class in the specific link in the menu

0

I've seen the effect on some sites! But I have no idea how to do it!

The effect works in a set, formed by the menu the body of the page and the class!

Let's say I have a menu with three tabs, with A B C. When the page is rolled down - I believe that - the page is "inspected" and the script checks where the user is on the page! And if it passes from point A to point B, a class is "transferred" from tab A to tab B.

Let's say this effect is a lower border, so if the user passes the border, the border also changes host from A to B! And if the user reaches the point C the border goes to C, and if user returns to point A, the border also returns to point A.

  

In the following link there is a real example of what I'm trying to say.

     
    

Scroll down the page and you will see that the checkered border between the tabs changes place as it reaches the tab point on the body of the document:

         
      

link

    
  
    
asked by anonymous 23.02.2016 / 01:17

0 answers