Merge pull request #25 from scott1702/userform-progress

keep first/last step buttons within userform-progress div
This commit is contained in:
Damian Mooyman 2015-08-13 12:47:43 +12:00
commit 6848b39ac0
1 changed files with 8 additions and 0 deletions

View File

@ -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);