【问题标题】:Smart-Wizard does not load first step智能向导不加载第一步
【发布时间】:2016-07-13 07:22:58
【问题描述】:

所以我正在使用智能向导https://github.com/mstratman/jQuery-Smart-Wizard

我已将它包含在 js-popup 中,因此当我打开弹出窗口时,它不会显示第一步。我需要去第二步,然后再回去看第一步

【问题讨论】:

  • 新版本Smart Wizard 4可用,这个问题可能已经解决了。

标签: javascript jquery smart-wizard


【解决方案1】:

我遇到了同样的问题,我下载了 smartWizard css,smart_wizard_all.ccs 版本并在文件的最后一行添加:

.tab-content {
    height: auto! Important;
}

我希望它对你有用。对不起我的英语我正在使用谷歌翻译哈哈哈, 问候,

【讨论】:

    【解决方案2】:

    我在调用 show modal 后通过“onmouseenter”来逃避这种情况。

    <div id="modal" onmouseenter="call_wizard()">
         <div id="wizard" class="form_wizard wizard_horizontal">
           <!-- step 1,2,3,4 -->
         </div>
    </div>
    <!--$('#modal').modal('show');-->
    <script>function call_wizard(){$('#wizard').smartWizard();}</script>
    

    【讨论】:

      【解决方案3】:

      不完全是一个修复,但我找到了一个解决方法。看起来 step-container 用高度零初始化。不知道为什么会这样,但我们可以在 css 文件中覆盖它。在用于设置“智能表单”样式的 css 文件中,查找名为 stepContainer 的类。

      .form_wizard .stepContainer {
         display: block;
         min-height:500px; // Add this line with your minimum height
         position: relative;
         margin: 0;
         padding: 0;
         border: 0 solid #CCC;
         overflow-x: hidden; } 
      

      这应该可以解决您的问题,直到有人可以首先解释为什么会发生。

      【讨论】:

        【解决方案4】:

        我遇到了与之前隐藏元素相同的问题,当我显示该元素时,我遇到了同样的问题,所以我尝试了下面的代码及其对我的工作

        `$('[name = elementName ]').show(1000, function() { 
             $("#wizard").smartWizard("currentRefresh");
        });`
        

        它实际上加载了第一个步骤,但它设置了它的高度为零,因为它之前是隐藏的,但是在应用 $("#wizard").smartWizard("currentRefresh"); 之后它会刷新当前步骤并设置适当的高度。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-12-24
          • 1970-01-01
          • 1970-01-01
          • 2017-08-06
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多