javascriptjqueryhtmlwizardsmart-wizard

how to make class="done" isdone="1" in smart wizard by default?


I'm using jQuery SmartWizard 3.3.1 in my project. I have 5 steps and I want to make all the steps enable(class="done" isdone="1") in every state. I try to do that using below HTML code, I already tried this answer.

...
 <a href="#step-4" rel="4" class="done" isdone="1"></a>
 <a href="#step-5" rel="5" class="done" isdone="1"></a>
...

enter image description here

after page load it changes to class="disabled" isdone="0" and make the wizard not traversal without going the steps one by one. I went through the documentation and could not find the relevant information to make this happen. Is there any way that we can achieve this by smart-wizard config? or else what is the best way to solve this issue?

My smartwizard int is below:

function init_SmartWizard() {
    "undefined" != typeof $.fn.smartWizard && (console.log("init_SmartWizard"), $("#wizard").smartWizard(), $("#wizard_verticle").smartWizard({
        transitionEffect: "slide",
        enableAllSteps: true,
        anchorClickable         :   true, // Enable/Disable anchor navigation
        enableAllAnchors        :   true, // Activates all anchors clickable all times
        markDoneStep            :   true, // add done css
        enableAnchorOnDoneStep  :   true // Enable/Disable the done steps navigation
    }), $(".buttonNext").addClass("btn btn-success"), $(".buttonPrevious").addClass("btn btn-primary"), $(".buttonFinish").addClass("btn btn-default"))
}

Solution

  • I had the same issue, the fix should be grouping the anchor settings like this:

    $('#smartwizard').smartWizard({
          anchorSettings: {
              anchorClickable: true, // Enable/Disable anchor navigation
              enableAllAnchors: true, // Activates all anchors clickable all times
              markDoneStep: true, // add done css
              enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
         },
    });
    

    This makes it possible to click any header. It did not change them from the grayed out state though.