How to remove a tab from jquery-steps

Hi there,
I want to dynamically create tabs on the jquery-steps wizard depending on user selection on previous pages.
It works, however if the user went back then I need to remove the newly created page.  For example, if user went back I want to remove the "Testing" tab.  How can I do this.  Thank you.

    var initCallForDialog = function(wizardDiv){
        var ReportTypeEnum = {
            SUMMARY_REPORT: {value:0, name:"SummaryReport"},
            DETAILED_REPORT: {value:1, name:"DetailedReport"}
        var stepOne = document.createElement("h3");
        stepOne.innerText = "Report";
        var sectOne = document.createElement("section");
        var sectOneDetails = __selectReportType();

        var stepTwo = document.createElement("h3");
        stepTwo.innerText = "Date and Time";
        var sectTwo = document.createElement("section");
        var sectTwoDetails = __createDateTimeSection();



        var mySteps = $(wizardDiv).steps({
            headerTag: "h3",
            bodyTag: "section",
            transitionEffect: "slideLeft",
            autoFocus: true,

            onCanceled: function (event) {

            onStepChanging: function(event, currentIndex, newIndex){
                    _selectedReportType = ReportTypeEnum.SUMMARY_REPORT;
                    console.log("summary report selected: currentIndex = " + currentIndex + " newIndex = " + newIndex);
                    if((newIndex == 1) && currentIndex == 0){
                        mySteps.steps("add", { title: "Testing", content: "This is a test2"});
                }else if($("input[name='radiotwo']").is(":checked")){
                    _selectedReportType = ReportTypeEnum.DETAILED_REPORT;
                    console.log("detailed report selected......");
                return true;

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
What would really help is the markup and the other code you use to initialise the wizard.  Can you post that?
ambuliAuthor Commented:
Thank you Rob.  Actually, I should have read their documentation properly before posting this question.  There is also an API that removes any 'step' given the index.  

mySteps.steps("remove", indexToRemove);
That removes the step.  Thank you.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ambuliAuthor Commented:
The documentation at this location provides the APIs.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.