views:

134

answers:

0

Hi I´m working with a form and want to use jQuery BBQ Plugin for saving history records for the user. The form is divided in two divs like this:

<div id="step-1">
<form>
some inputs...
<input type="button" id="next" value="Next &raquo;"/>
</form>
</div>
<div id="step-2">
<form>
some more inputs...
<input type="submit" id="submit" value="Send &raquo;"/>
</form>
</div>

Right now is there some css that hides #step-2 and when the user clicks the #next-button the #step-1 is hide (hide();) and #step-2 show();, before this the form is validated. There is also a progress bar:

 <ul id="progress" class="progress-1">
 <li><a href="">Step 1</a></li>
 <li><a href="">Step 2</a></li>
 </ul>

The progressbar also change class through a function depending on step.

So basically what I want is that whenever a user either clicks the next-button and the form passes the validation a history record should be saved so the user easily could go back and forth between step 1 and 2. I foun jQuery BBQ but can't really figure out how to implement it. The user also has to be able to use the progressbar-links in order to do the same thing.