Skip to content

Next doesn't work right if sibling elements are present that do not match ".step" #50

@rinogo

Description

@rinogo

Not enough time to make a proper PR, but I'll post this here in case it helps anyone.

I'm hiding steps in my backend code by changing the class on a step from .step to .hidden-step. This works great, but navigating with the "Next" button causes the plugin to attempt to show our .hidden-step element instead of skipping it and showing the next .step element.

Here's the fix. Make the change to the _navigate() function:

// var step1 =  this.steps.filter("#" + step).next().attr("id"); //Original, gets next sibling (regardless of what it is!).
var step1 =  this.steps.filter("#" + step).nextAll(".step").first().attr("id"); //Fixed by rinogo, 11/27/17, gets next ".step"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions