Step Challenge - Prev from end, x/y step display
This commit is contained in:
@@ -1179,14 +1179,12 @@ common.init.push((function() {
|
||||
var submitModalId = '#challenge-step-modal';
|
||||
|
||||
function getPreviousStep($challengeSteps) {
|
||||
var length = $challengeSteps.length;
|
||||
var $prevStep = false;
|
||||
var prevStepIndex = 0;
|
||||
$challengeSteps.each(function(index) {
|
||||
var $step = $(this);
|
||||
if (
|
||||
!$step.hasClass('hidden') &&
|
||||
index + 1 !== length
|
||||
!$step.hasClass('hidden')
|
||||
) {
|
||||
prevStepIndex = index - 1;
|
||||
}
|
||||
@@ -1220,7 +1218,7 @@ common.init.push((function() {
|
||||
e.preventDefault();
|
||||
var prevStep = getPreviousStep($(stepClass));
|
||||
$(this)
|
||||
.parent()
|
||||
.parent().parent()
|
||||
.removeClass('fadeOutLeft')
|
||||
.addClass('animated fadeOutRight fast-animation')
|
||||
.delay(250)
|
||||
@@ -1244,7 +1242,7 @@ common.init.push((function() {
|
||||
e.preventDefault();
|
||||
var nextStep = getNextStep($(stepClass));
|
||||
$(this)
|
||||
.parent()
|
||||
.parent().parent()
|
||||
.removeClass('fadeOutRight')
|
||||
.addClass('animated fadeOutLeft fast-animation')
|
||||
.delay(250)
|
||||
|
Reference in New Issue
Block a user