Skip to content

Instantly share code, notes, and snippets.

@krutz27
Created October 4, 2013 14:03
Show Gist options
  • Save krutz27/6826402 to your computer and use it in GitHub Desktop.
Save krutz27/6826402 to your computer and use it in GitHub Desktop.
<div class="row-fluid">
<p class="lead well">
This page is both a demonstration of the accordion wizard and instructions. Click the buttons and links to see the wizard in action, or view the source to see a complete implementation. Full details, including API documentation and full source code, are available on <a href="https://github.com/sathomas/acc-wizard">GitHub</a>.
</p>
</div>
<div class="row-fluid acc-wizard">
<div class="span3" style="padding-left: 2em;">
<p style="margin-bottom: 2em;">
Follow the steps below to follow the workflow / wizard.
</p>
<ol class="acc-wizard-sidebar">
<li class="acc-wizard-todo"><a href="#prerequisites">Step One</a></li>
<li class="acc-wizard-todo"><a href="#addwizard">Step Two</a></li>
<li class="acc-wizard-todo"><a href="#adjusthtml">Step Three</a></li>
<li class="acc-wizard-todo"><a href="#viewpage">Step Four</a></li>
</ol>
</div>
<div class="span9">
<div class="accordion" id="accordion-demo">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-demo" href="#prerequisites">
First, Start Here
</a>
</div>
<div id="prerequisites" class="accordion-body collapse in">
<div class="accordion-inner">
<form id="form-prerequisites">
Here are details for Step 1..
</form>
</div> <!--/.accordion-inner -->
</div> <!-- /#prerequisites -->
</div> <!-- /.accordion-group -->
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-demo" href="#addwizard">
Then, Follow these Steps
</a>
</div>
<div id="addwizard" class="accordion-body collapse in">
<div class="accordion-inner">
<form id="form-addwizard">
Here are details for Step 2..
</form>
</div> <!--/.accordion-inner -->
</div> <!-- /#addwizard -->
</div> <!-- /.accordion-group -->
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-demo" href="#adjusthtml">
You're Almost Done
</a>
</div>
<div id="adjusthtml" class="accordion-body collapse in">
<div class="accordion-inner">
<form id="form-adjusthtml">
Here are details for Step 3..
</form>
</div> <!--/.accordion-inner -->
</div> <!-- /#adjusthtml -->
</div> <!-- /.accordion-group -->
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-demo" href="#viewpage">
The Last Step
</a>
</div>
<div id="viewpage" class="accordion-body collapse in">
<div class="accordion-inner">
<form id="form-viewpage">
<p>
Here are details for Step 4. Done!
</p>
</form>
</div> <!--/.accordion-inner -->
</div> <!-- /#viewpage -->
</div> <!-- /.accordion-group -->
</div>
</div>
</div>
<div class="container-fluid"><a href="http://bootply.com/63398">Edit on Bootply</a></div>
function onNext(parent, panel) {
$(".acc-wizard-todo").click(function(e) {
e.preventDefault();
});
hash = "#" + panel.id;
$(".acc-wizard-sidebar",$(parent))
.children("li")
.children("a[href='" + hash + "']")
.parent("li")
.removeClass("acc-wizard-todo")
.addClass("acc-wizard-completed");
}
$.getScript('http://sathomas.me/acc-wizard/js/acc-wizard.min.js',function(){
$(".acc-wizard").accwizard({
onNext: onNext
});
});
@import url('http://sathomas.me/acc-wizard/css/acc-wizard.min.css');
@faizanshah512
Copy link

EEqPRgfU0AETIpy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment