Comments (8)
@outprove Thanks for reporting. I will take a look when I have some free time.
from jquery-wizard.
@outprove I looked at the JSFiddle example briefly and I noticed several problems, although I don't see how any of them could cause the behavior you're experiencing:
- you don't need to apply any wizard-* classes yourself -- the plugin will take care of this for you.
- not every step needs to have it's own branch. the wizard itself is the default branch, so steps can just be children of the wizard (unless branches are needed).
- by default, the wizard will transition to the
data-state
provided -- so you don't need to manually provide all of those transitions yourself. If you want to make sure the.val()
of the current step is not blank before proceeding, you can do that once in thebeforeForward
event handler.
from jquery-wizard.
It will be difficult to try to reproduce this case outside of that JSFiddle since there is so much stuff going on. If anyone can reproduce this using a unit test, that would be preferable.
from jquery-wizard.
@kflorence I'm actually using a database procedure to dynamically genereate the JS/HTML based on a user-customizable questionnaire. (Hence the excessive branches/transitions for every question, I never know what I'll need in terms of complexity of dependencies ). I'll attempt to reproduce with a stripped down test.
from jquery-wizard.
I simplified it, I simply used the first included example (and stripped it to the first one at that.) Here's the jsfiddle:
https://jsfiddle.net/ed1rb2fr/17/
To reproduce it:
- Start the wizard by clicking on the button
- Enter a value in name, and hit forward
- At the second step hit destroy wizard
- Click startwizard again, the first step shows again properly
- Hit forward
You'll see then instead of just the second step, you'll see the second step and the result shown together. This doesnt happen during the first pass of the wizard if you dont destroy it.
Thanks!
from jquery-wizard.
@outprove thanks for taking the time to do that, sorry I've been so busy, haven't had time to take a look yet. Perhaps I can get to it this weekend.
from jquery-wizard.
@kflorence FYI, I figured out what the issue was - for some reason if you destroy and then reinstitute the wizard, the click event gets added again. I added a step in the destroy function that specifically unbinds the click event for both forward and backward:
( jQuery(self.elements.forward).off("click");
jQuery(self.elements.backward).off("click");)
That seemed to do the trick.
from jquery-wizard.
@outprove thanks for digging into it. Sorry that I haven't had time to be more responsive. It sounds like this might be something that can be patched in the code. I'll take a look when I get the chance.
from jquery-wizard.
Related Issues (20)
- Disable Submit Button After Click HOT 1
- ignore of validate HOT 1
- Multiple questions require branches
- Branch error messages HOT 1
- Responsiveness Support HOT 4
- Validation doesn't work in presence of labels HOT 2
- How to dynamic create steps HOT 2
- Aync transitions and content HOT 2
- .on not supported in jQuery 1.6 HOT 5
- hide or show step dynamically HOT 2
- History back() support ? HOT 1
- Issue Adding to Wordpress HOT 2
- Reset Wizard? HOT 1
- Question HOT 5
- Input disappeared in multiple nested branches in a single page
- Check for step's controls validity before calculating transition
- How can i skip step ?
- How can I add another submit button for "Save and finish later"
- How can I have 3 working submit buttons with different names? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-wizard.