According to Scroll and apply class on the specific link in the menu

Asked

Viewed 46 times

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 page body and the class!

Let’s say I have a menu with three tabs, being A B C. When the page is scrolled down - I think - the page is "inspected" and the script checks which point of the page the user is at! And if it passes point A pro B a class is "transferred" from tab A to tab B.

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

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

Roll the page down and you will see that the square border between the tabs changes place as it reaches the tab point in the body of the document ::

https://www.createwebsite.net/freebies/atlas/index.html

  • @Guilhermenascimento is not that!! I’ll look for a link that has some example!! 1

  • @Guilhermenascimento added a link with an example! It is worth saying that you can find this effect on the Internet but the purpose of the question is to learn how to do it!

  • Ivan see if this works http://answall.com/q/17457/3635

  • This link fits the answer perfectly! http://jsfiddle.net/mekwall/up4nu/

  • Ivan it seems to me that this http://answall.com/a/17491/3635 too, he just didn’t add a LIVE example, but it’s the same effect, the difference is he didn’t use it transition in CSS, but so far this is just an extra effect

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.