$sectionsWrapper=$('<div style="position:relative;overflow:hidden;"></div>').insertBefore($sections.eq(0));// Add DIV above the first fieldset.sectionwrap element
$sectionsWrapper=$('<div style="position:relative;overflow:hidden;"></div>').insertBefore($sections.eq(0));// Add DIV above the first fieldset.sectionwrap element
$sectionsWrapperInner=$('<div style="position:absolute;left:0;top:0;"></div>');// Create inner DIV of $sectionswrapper that will scroll to reveal a fieldset element
$sectionsWrapperInner=$('<div style="position:absolute;left:0;top:0;"></div>');// Create inner DIV of $sectionswrapper that will scroll to reveal a fieldset element
}
}
varmaxfieldsetwidth=$sections.eq(0).outerWidth();// Variable to get width of widest fieldset.sectionwrap
letmaxfieldsetwidth=$sections.eq(0).outerWidth();// Variable to get width of widest fieldset.sectionwrap
$sections.slice(1).each(function(){// Loop through $sections (starting from 2nd one)
$sections.slice(1).each(function(){// Loop through $sections (starting from 2nd one)
maxfieldsetwidth+=2;// Add 2px to final width to reveal fieldset border (if not removed via CSS)
maxfieldsetwidth+=2;// Add 2px to final width to reveal fieldset border (if not removed via CSS)
thiswizard.maxfieldsetwidth=maxfieldsetwidth;
thiswizard.maxfieldsetwidth=maxfieldsetwidth;
$sections.each(function(i){// Loop through $sections again
$sections.each(function(i){// Loop through $sections again
var$section=$(this);
const$section=$(this);
if (setting.revealfx[0]==='slide'){
if (setting.revealfx[0]==='slide'){
$section.data('page',i).css({position:'absolute',top:0,left:maxfieldsetwidth*i}).appendTo($sectionsWrapperInner);// Set fieldset position to "absolute" and move it to inside sectionswrapper_inner DIV
$section.data('page',i).css({position:'absolute',top:0,left:maxfieldsetwidth*i}).appendTo($sectionsWrapperInner);// Set fieldset position to "absolute" and move it to inside sectionswrapper_inner DIV
}
}
...
@@ -179,9 +177,9 @@ formtowizard.prototype = {
...
@@ -179,9 +177,9 @@ formtowizard.prototype = {
}
}
$theform.prepend($stepsguide);// Add $thesteps div to the beginning of the form
$theform.prepend($stepsguide);// Add $thesteps div to the beginning of the form
// $stepsguide.insertBefore($sectionswrapper) //add Steps Container before sectionswrapper container
// $stepsguide.insertBefore($sectionswrapper) //add Steps Container before sectionswrapper container
var$thesteps=$stepsguide.find('div.step');
const$thesteps=$stepsguide.find('div.step');
// Create pagination DIV and add it to end of form:
// Create pagination DIV and add it to end of form: