最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Smart-Wizard does not load first step - Stack Overflow

programmeradmin3浏览0评论

So I am using smart-wizard .

I have included it in js-popup, so when I open the popup it does not show the first step. I need go to the second step and then go back to see the first step

So I am using smart-wizard https://github./mstratman/jQuery-Smart-Wizard.

I have included it in js-popup, so when I open the popup it does not show the first step. I need go to the second step and then go back to see the first step

Share Improve this question edited Dec 5, 2016 at 14:03 Dipu Raj 1,8944 gold badges33 silver badges39 bronze badges asked Jul 13, 2016 at 7:22 MrEnergyMrEnergy 772 silver badges10 bronze badges 1
  • New version Smart Wizard 4 is available, this issue might have fixed on it. – Dipu Raj Commented Dec 5, 2016 at 13:16
Add a ment  | 

4 Answers 4

Reset to default 6

I had the same problem, what I did was download the smartWizard css, the smart_wizard_alls version and in the last line of the file add:

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

I hope it works for you. Sorry about my English I am using the google translator hahahaha, Greetings,

i escape this case by "onmouseenter" after call show modal.

<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>

Not exactly a fix, but I found a workaround. Looks like the step-container initializes with height zero. Don't know why this happens, but we can override it in the css file. In the css file you are using to style your "Smart Form", look for a class called 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; } 

This should fix your problem until someone can explain why it happens in the first place.

I am getting the same kind of problem as element is previously hide and when I show that element then I am getting same problem so I tried this below code and its work for me

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

Its actually load the fist step but it set its height to zero as its is previously hidden but after applying $("#wizard").smartWizard("currentRefresh"); it refresh the current step and set proper height.

发布评论

评论列表(0)

  1. 暂无评论