diff --git a/lib/jquery.easyWizard.js b/lib/jquery.easyWizard.js index 5e92856..ba1770b 100644 --- a/lib/jquery.easyWizard.js +++ b/lib/jquery.easyWizard.js @@ -45,14 +45,14 @@ return this.each(function() { thisSettings = settings; - $this = $(this); // Wizard Obj + $this = $(this); /* Wizard Obj */ $this.addClass('easyWizardElement'); $steps = $this.find('.'+thisSettings.stepClassName); thisSettings.steps = $steps.length; thisSettings.width = $(this).width(); if(thisSettings.steps > 1) { - // Create UI + /* Create UI */ $this.wrapInner('
'); $this.find('.easyWizardWrapper').width(thisSettings.width * thisSettings.steps); $this.css({ @@ -112,7 +112,7 @@ $formObj = $this.is('form')?$this:$(this).find('form'); - // beforeSubmit Callback + /* beforeSubmit Callback */ $this.find('[type="submit"]').bind('click.easyWizard', function(e) { $wizard = $(this).parents('.easyWizardElement'); var beforeSubmitValue = thisSettings.beforeSubmit($wizard); @@ -148,23 +148,23 @@ $nextStep = this.find('.'+thisSettings.stepClassName+'[data-step="'+step+'"]'); currentStep = $activeStep.attr('data-step'); - // Prevent sliding same step + /* Prevent sliding same step */ if (currentStep == step) return; - // Before callBack + /* Before callBack */ var beforeValue = thisSettings.before(this, $activeStep, $nextStep); if(beforeValue === false) { return false; } - // Define direction for sliding - if(currentStep < step) { // forward + /* Define direction for sliding */ + if(currentStep < step) { /* forward */ leftValue = thisSettings.width * -1; - }else { // backward + }else { /* backward */ leftValue = thisSettings.width; } - // Slide ! + /* Slide ! */ $activeStep.removeClass('active'); $activeStep.find('input, textarea, select, button').attr('tabindex', '-1'); @@ -177,11 +177,11 @@ $activeStep.css({ height: '1px' }); }); - // Defines steps + /* Defines steps */ this.find('.easyWizardSteps .current').removeClass('current'); this.find('.easyWizardSteps li[data-step="'+step+'"]').addClass('current'); - // Define buttons + /* Define buttons */ $paginationBloc = this.find('.easyWizardButtons'); if($paginationBloc.length) { if(step == 1) { @@ -191,7 +191,7 @@ $paginationBloc.find('.submit').hide(); $paginationBloc.find('.prev, .next').show(); }else { - if($nextStep.prev('.'+thisSettings.stepClassName).length) { // If there is a previous step, must be always the case but... you know =) + if($nextStep.prev('.'+thisSettings.stepClassName).length) { /* If there is a previous step, must be always the case but... you know =) */ $paginationBloc.find('.prev').show(); } $paginationBloc.find('.next').hide(); @@ -199,7 +199,7 @@ } } - // After callBack + /* After callBack */ thisSettings.after(this, $activeStep, $nextStep); } };