From 53a9aafbe57d314e1da625dee51dc3ab2f045f6f Mon Sep 17 00:00:00 2001 From: scott1702 Date: Thu, 13 Aug 2015 12:39:04 +1200 Subject: [PATCH] keep first/last buttons within userform-progress div --- javascript/UserForm.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/javascript/UserForm.js b/javascript/UserForm.js index 26bb719..1aca9c1 100644 --- a/javascript/UserForm.js +++ b/javascript/UserForm.js @@ -431,6 +431,14 @@ jQuery(function ($) { buttonOffset = -1 * ($button.innerWidth() / 2); $button.css({left: leftPercent, marginLeft: buttonOffset}); + + // First and last buttons are kept within userform-progress container + if (index === self.$jsAlign.length - 1) { + $button.css({marginLeft: buttonOffset * 2}); + } else if (index === 0) { + $button.css({marginLeft: 0}); + } + }); this.update(1);