Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation dots #76

Open
Welleee opened this issue Nov 22, 2016 · 0 comments
Open

Navigation dots #76

Welleee opened this issue Nov 22, 2016 · 0 comments

Comments

@Welleee
Copy link

Welleee commented Nov 22, 2016

Hi, i am trying to do a navigation dots with ascensor.
I have two floors:
Section 1 Section 2 Section 3
Section 1.1 Section 2.1 Section 3.1

I have three dots (one for each section). In the first floor the navigation works but the problem is when i go to the second floor (section 1.1, section 1.2 and section 1.3), the dots keeps bind with section 1, section 2 and section 3.
So how can i do to fix it?

Here my code:

<ul class="links-to-floor">
    <li><a class=""><span></span></a></li>
    <li><a class=""><span></span></a></li>
    <li><a class=""><span></span></a></li>
</ul>

$(".links-to-floor li span:eq(" + alce.data("current-floor") + ")").addClass("selected")`

 $(".links-to-floor li").click(function() {
        ascensor.trigger("scrollToStage", $(this).index());
    })
        
 ascensor.on("scrollStart", function(e, o) {
        $(".links-to-floor li span").removeClass("selected"),
        $(".links-to-floor li span:eq(" + o.to + ")").addClass("selected")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant