I have a problem where I need to change the form based on if the user has entered some information.
I need to remove each step from jQuery steps except for the step the user is currently on and then add a brand new step
I am having no problem removing the steps but when I run my insert command nothing happens.
_self.form.steps("remove",1);
_self.form.steps("remove",2);
_self.form.steps("remove",3);
_self.form.steps("remove",4);
_self.form.steps("Insert",5, {
title:"Test Head",
content: "<p>Test</P>"
});
if I place an alert before the Insert it will show however if I place it after the Insert it does not. Any idea where I am going wrong with this?
I see a little typo in your code. The insert
method name must be in lowercase as we can see in the documentation:
insert
Inserts a new step to a specific position. (chainable)
Here is JSFiddle with the example where the second step is deleted and a new step is inserted at this place:
http://jsfiddle.net/SashkaCosmonaut/mzuc7mxL/1/
(Sorry for the style, I don't know why it looks like that...)