Skip to content

Commit

Permalink
Updated example on how to set options in runtime.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Sundman committed Feb 20, 2011
1 parent acf239f commit 47ca8bd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions examples/example_11_changing_options_after_initialization.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<h3>Example of how to set options in runtime</h3>
<ul>
<li>When initialized, the wizard does not focus the first input automatically</li>
<li>After clicking next, the first input on each step will be focused</li>
<li>After clicking next and Finland has been chosen, the transition animation will be changed.</li>
</ul>
<hr />
<h5 id="status"></h5>
Expand Down Expand Up @@ -175,8 +175,14 @@ <h5 id="status"></h5>
);

$("#demoForm").bind("step_shown", function(event,data){
if(data.currentStep === 'sweden' || data.currentStep === 'finland')
$("#demoForm").formwizard("option","focusFirstInput", true);
if(data.currentStep === 'finland')
$("#demoForm").formwizard("option",{inAnimation : {height: 'show'},
outAnimation: {height: 'hide'},
inDuration : 700,
outDuration: 700,
easing: 'easeOutBounce'});


})
});
</script>
Expand Down

0 comments on commit 47ca8bd

Please sign in to comment.