From 2bd70c3805e6cad68f5178c95c0d15e583cda59f Mon Sep 17 00:00:00 2001 From: scott1702 Date: Thu, 13 Aug 2015 11:13:13 +1200 Subject: [PATCH] allow js positioning to be removed --- javascript/UserForm.js | 5 +++-- templates/Includes/UserFormProgress.ss | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/javascript/UserForm.js b/javascript/UserForm.js index 1a4a4f3..f4bc055 100644 --- a/javascript/UserForm.js +++ b/javascript/UserForm.js @@ -322,6 +322,7 @@ jQuery(function ($) { this.$el = element instanceof jQuery ? element : $(element); this.$buttons = this.$el.find('.step-button-jump'); + this.$jsAlign = this.$el.find('.js-align'); // Update the progress bar when 'step' buttons are clicked. this.$buttons.each(function (i, stepButton) { @@ -337,9 +338,9 @@ jQuery(function ($) { }); // Spaces out the steps below progress bar evenly - this.$buttons.each(function (index, button) { + this.$jsAlign.each(function (index, button) { var $button = $(button), - leftPercent = (100 / (self.$buttons.length - 1) * index + '%'), + leftPercent = (100 / (self.$jsAlign.length - 1) * index + '%'), buttonOffset = -1 * ($button.innerWidth() / 2); $button.css({left: leftPercent, marginLeft: buttonOffset}); diff --git a/templates/Includes/UserFormProgress.ss b/templates/Includes/UserFormProgress.ss index 0af9a18..7496a89 100644 --- a/templates/Includes/UserFormProgress.ss +++ b/templates/Includes/UserFormProgress.ss @@ -10,7 +10,7 @@