0

I am adding some dynamic content during the showStep event of a Smart Wizard form (I create some DIVS), and I would like to resize the step accordingly.

I am calling it like this :

$("#smartwizard").on("showStep", function (e, anchorObject, stepIndex, stepDirection, stepPosition) {
//When loading STEP3, add a new empty row
if (stepIndex == 2){
    //addNewRow();
    $("#smartwizard").smartWizard('fixHeight');
}

}

This causes the following error

jquery.smartWizard.min.js:12

Uncaught TypeError: Cannot read properties of null (reading 'outerHeight')
at n.value (jquery.smartWizard.min.js:12:8279)
at n.value (jquery.smartWizard.min.js:12:12392)
at l.fn.smartWizard (jquery.smartWizard.min.js:12:12778)
at HTMLDivElement.<anonymous> (new:2147:35)
at HTMLDivElement.dispatch (jquery-3.6.1.js:5430:27)
at elemData.handle (jquery-3.6.1.js:5234:28)
at Object.trigger (jquery-3.6.1.js:8745:12)
at HTMLDivElement.<anonymous> (jquery-3.6.1.js:8823:17)
at Function.each (jquery-3.6.1.js:385:19)
at jQuery.fn.init.each (jquery-3.6.1.js:207:17)

How can I fix it? Thank you.

b126
  • 544
  • 4
  • 11

0 Answers0