Step Form JavaScript
<script>
$(document).ready(function () {
$('.next').on('click', function () {
var current = $(this).data('currentBlock'),
next = $(this).data('nextBlock');
// only validate going forward. If current group is invalid, do not go further
if (next > current)
if (false === $('#step-form'))
return;
// validation was ok. We can go on next step.
$('.block' + current)
.removeClass('show fadeInRight')
.addClass('hidden fadeOutRight');
$('.block' + next)
.removeClass('hidden fadeOutRight')
.addClass('show fadeInRight')
});
});
</script>