orige-zz / jquery-bootstrap-modal-steps

A lightweight step by step modal for bootstrap
MIT License
30 stars 36 forks source link

Callback issue #8

Open suarezph opened 8 years ago

suarezph commented 8 years ago

How do I open the step 2 or step 3 ignoring the previous step directly in modal when pressing the button? Can you give me some clue or site. really need it :(

suarezph commented 8 years ago

Hi I have added edited the plugin and added "actualStep" in the "settings" to make the step dynamic.

           `if(settings.actualStep == '1'){
               $btnPrevious.attr('disabled', 'disabled');
            } else{
                $btnPrevious.removeAttr('disabled');
            }`

          `$actualStep = $('<input>').attr({
                'type': 'hidden',
                'id': 'actual-step',
                'value': settings.actualStep,
            });

            $modal.find('#actual-step').remove();
            $modal.append($actualStep);

            actualStep = settings.actualStep;
            nextStep = actualStep + 1;`