shama/jmpress.js — Issue #41: #getStepParents tripping over non-step "container" elements
Author: luniki
Created: 2012-03-06 20:48:53+00:00
State: open

Is there a reason why this function:

function getStepParents( el ) {
var parents = [];
var currentEl = el;
while($(currentEl).parent().length &&
$(currentEl).parent().is(settings.stepSelector)) {
currentEl = $(currentEl).parent();
parents.push(currentEl[0]);
}
return parents;
}

is implemented this way instead of:

function getStepParents( el ) {
return $(currentEl).parents(settings.stepSelector);
}

The current implementation requires that nested div.steps are children of other div.steps. This way one cannot bundle the nested steps inside of a section element for example.