Comments (10)
Are you referring to the "Next", "Previous" and step-number buttons?
If so, those are currently hard-coded to the "click" event. Although I think it generally sounds like an unintuitive UI choice, it's not inconceivable to add a "buttonEvent" option that specifies what to bind to.
Just for my own curiosity, would you care to share what you're trying to do or why you want to use double clicks?
Either way, I'd be happy to accept a "buttonEvent" patch. Or I can add it myself, but I'm not sure when I will be able to get to it.
from jquery-smart-wizard.
Yes, its the Nex and Prev buttons I am referring to.
Please go to any demo page of SmartWizard 3 (did not appear to do it in 2) and try double-clicking "Next" instead of just single clicking at a nice logical pace.
It still amazes me how many people think they have to double-click links on a web page.
from jquery-smart-wizard.
So you're looking for double clicks in addition to rather than instead of single clicks?
from jquery-smart-wizard.
By the way, I don't think I changed the event bindings at all - so version 3 shouldn't behave differently than 2 with respect to clicks, as far as I know.
But i could certainly be mistaken.
from jquery-smart-wizard.
Hi sorry for my tardy replies
What I'm hoping for is the dblClick to not generate 2 single clicks, as I know several users who accidentally double-click everything in sight and this causes problems with SmartWizard. - well for the way I have implemented it anyhow.
Here is a demo of a smartWizard that demonstrates the strange behaviour. Single click slowly through each step and its fine, then start again and double-click "Next"
Notice how you see the content of 2 panels at once after double-clicking "Next" - well I do in Firefox at least. Its as if the code could not keep up with the speed of 2 "Next" clicks in sequence.
Thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="http://mstratman.github.com/jQuery-Smart-Wizard/styles/smart_wizard.css" rel="stylesheet" type="text/css">
<script src="http://mstratman.github.com/jQuery-Smart-Wizard/js/jquery-1.4.2.min.js"></script>
<script src="http://mstratman.github.com/jQuery-Smart-Wizard/js/jquery.smartWizard.js"></script>
<script >
$(document).ready(function(){
// Smart Wizard
$('#block_wizard').smartWizard();
});
</script>
<style>
.swMain div.actionBar {
position: absolute;
bottom:0px;
right:0px;
}
#block_wizard {
height:600px;
}
.stepContainer {
height:550px !important;
}
</style>
<body>
<div id="block_wizard" class="swMain">
<ul>
<li><a href="#block_Item_1">
<label class="stepNumber">1</label>
<span class="stepDesc">
Item 1<br />
<small>Try dblClick Next</small>
</span>
</a>
</li>
<li><a href="#block_Item_2">
<label class="stepNumber">2</label>
<span class="stepDesc">
Item 2<br />
<small>Skips to 3</small>
</span>
</a>
</li>
<li><a href="#block_Item_3">
<label class="stepNumber">3</label>
<span class="stepDesc">
Item 3<br />
<small>But shows 2+3 content</small>
</span>
</a>
</li>
</ul>
<div>
<form >
<div id="block_Item_1">
<table >
<tbody>
<tr><td>Text 1</td><td><input type="text" /></td></tr>
<tr><td>Text 2</td><td><input type="text" /></td></tr>
<tr><td>Text 3</td><td><input type="text" /></td></tr>
</tbody>
</table>
</div>
<div id="block_Item_2">
<table >
<tbody>
<tr><td>Text 3a</td><td><input type="text" /></td></tr>
<tr><td>Text 4a</td><td><input type="text" /></td></tr>
<tr><td>Text 5a</td><td><input type="text" /></td></tr>
</tbody>
</table>
</div>
<div id="block_Item_3">
<table >
<tbody>
<tr><td>Text 5b</td><td><input type="text" /></td></tr>
<tr><td>Text 6b</td><td><input type="text" /></td></tr>
<tr><td>Text 7b</td><td><input type="text" /></td></tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
</body>
</html>
from jquery-smart-wizard.
Hi wolispace,
I found a solution to this. Not tested much.
$(document).ready(function () {
$('#wizard').smartWizard({
onLeaveStep: leaveAStepCallback,
onFinish: onFinishCallback,
onShowStep: onShowStep
});
function onShowStep(obj, context) {
$(".buttonPrevious").unbind("click").click(function (e) {
e.preventDefault();
$("#wizard").smartWizard("goBackward");
});
$(".buttonNext").unbind("click").click(function (e) {
e.preventDefault();
$("#wizard").smartWizard("goForward");
});
}
function leaveAStepCallback(obj, context) {
$(".buttonPrevious").unbind("click");
$(".buttonNext").unbind("click");
return true;
}
function onFinishCallback(objs, context) {
}
});
from jquery-smart-wizard.
Nice one irfnkprc.
I re-worked this logic into my code and it works a treat.
Ideally this logic would be built into SmartWziard (I will leave this open for mstratman to comment on), but until then this will do me,
Thanks
from jquery-smart-wizard.
hi irfnkprc thanks for your wonderfull fix...it works great...
from jquery-smart-wizard.
hi irfnkprc,
thanks for the suggestion. It works. The problem that I am facing is when the validation rule is performed and something when wrong. It will stay at the original step. This is fine. But after completing the validation and click next, it will never goto next function at all. How should I go about settling this?
from jquery-smart-wizard.
it works, thank you, irfnkprc!
from jquery-smart-wizard.
Related Issues (20)
- All events are not working HOT 1
- Two step wizard incorrect rendering
- Cannot read property 'hasOwnProperty' of undefined HOT 2
- goToStep is not working HOT 5
- $(target).children("ul") vs $(target).find("ul")
- is it possible to translate the button? HOT 4
- Page scrolls while going to next step HOT 2
- http://techlaboratory.net/smartwizard/documentation HOT 1
- Tabs distortion/crash on each other when Nav bar get to long
- Modify step arrow hover color
- Enable all Steps HOT 1
- A xss in example
- re organise the buttons , Finish , Previous next , Discard changes
- LeaveStep event not fire after using "goToStep"
- fixHeight not working
- Error : Element not found .nav
- Reload step content HOT 1
- Reset form wizard
- Disabling step
- Enable next button when all the required / "*" fields are Filled by user. Or the next button should stay disabled.
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-smart-wizard.