【问题标题】:Smart Wizard with two steps no correct rendering有两步的智能向导没有正确的渲染
【发布时间】:2017-08-27 12:59:34
【问题描述】:

对于表单,我使用的是智能向导实例:https://github.com/mstratman/jQuery-Smart-Wizard

我现在只有两个步骤,并且呈现不正确。这条线比第二个气泡长。我该如何解决这个问题?

<form id="reportForm" method="post">
   <div id="reportWizard" class="form_wizard wizard_horizontal">
      <ul class="wizard_steps">
         <li>
            <a href="#step-1">
            <span class="step_no">1</span>
            <span class="step_descr">
            Schritt 1<br/>
            <small>Spielinformationen angeben</small>
            </span>
            </a>
         </li>
         <li>
            <a href="#step-2">
            <span class="step_no">2</span>
            <span class="step_descr">
            Schritt 2<br/>
            <small>Bewertung abgeben</small>
            </span>
            </a>
         </li>
      </ul>
      <div id="step-1">
         <div class="form-horizontal form-label-left">                                   
         </div>
      </div>
      <div id="step-2">
         <div class="form-horizontal form-label-left">
         </div>
      </div>
   </div>
</form>

<script>
$(document).ready(function() {
    $('#reportWizard').smartWizard({
        // Properties
        labelNext: 'Weiter', // label for Next button
        labelPrevious: 'Zurück', // label for Previous button
        labelFinish: 'Bericht anlegen', // label for Finish button
        onFinish: function() {
            document.getElementById("reportForm").submit();
        } // triggers when Finish button is clicked
    });
    $('.buttonNext').addClass('btn btn-success');
    $('.buttonPrevious').addClass('btn btn-primary');
    $('.buttonFinish').addClass('btn btn-default');
});
</script>

【问题讨论】:

    标签: php jquery smart-wizard


    【解决方案1】:

    刚刚检查了您的代码

    并尝试过这个

    <form id="reportForm" method="post">
                                <div id="reportWizard" class="form_wizard wizard_horizontal">
                                    <ul class="wizard_steps">
                                        <li>
                                            <a href="#step-1">
                                                <span class="step_no">1</span>
                                                <span class="step_descr">
                                                    Schritt 1<br />
                                                    <small> angeben</small>
                                                </span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#step-2">
                                                <span class="step_no">2</span>
                                                <span class="step_descr">
                                                    Schritt 2<br />
                                                    <small> abgeben</small>
                                                </span>
                                            </a>
                                        </li>
                                    </ul>
                                    <div id="step-1">
                                        <div class="form-horizontal form-label-left">
                                        </div>
                                    </div>
                                    <div id="step-2">
                                        <div class="form-horizontal form-label-left">
                                        </div>
                                    </div>
                                </div>
                            </form>
    

    并检查了智能向导不支持长描述词。因为如果您删除“Bewertung”和“Spielinformationen”,它就会起作用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-01
      • 2021-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-17
      • 2020-05-12
      • 2015-03-21
      相关资源
      最近更新 更多