Ascensor.js icon indicating copy to clipboard operation
Ascensor.js copied to clipboard

Navigation dots

Open Welleee opened this issue 9 years ago • 0 comments

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")

Welleee avatar Nov 22 '16 15:11 Welleee