Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/03/2015, 03:43
darkcl0wn
 
Fecha de Ingreso: febrero-2014
Mensajes: 32
Antigüedad: 10 años, 3 meses
Puntos: 0
Respuesta: Formulario que no envia datos

Tambien hay un JS que opera en el Formulario.

Código Javascript:
Ver original
  1. /*
  2. Orginal Page: http://thecodeplayer.com/walkthrough/jquery-multi-step-form-with-progress-bar
  3.  
  4. */
  5. //jQuery time
  6. var current_fs, next_fs, previous_fs; //fieldsets
  7. var left, opacity, scale; //fieldset properties which we will animate
  8. var animating; //flag to prevent quick multi-click glitches
  9.  
  10. $(".next").click(function(){
  11.     if(animating) return false;
  12.     animating = true;
  13.    
  14.     current_fs = $(this).parent();
  15.     next_fs = $(this).parent().next();
  16.    
  17.     //activate next step on progressbar using the index of next_fs
  18.     $("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
  19.    
  20.     //show the next fieldset
  21.     next_fs.show();
  22.     //hide the current fieldset with style
  23.     current_fs.animate({opacity: 0}, {
  24.         step: function(now, mx) {
  25.             //as the opacity of current_fs reduces to 0 - stored in "now"
  26.             //1. scale current_fs down to 80%
  27.             scale = 1 - (1 - now) * 0.2;
  28.             //2. bring next_fs from the right(50%)
  29.             left = (now * 50)+"%";
  30.             //3. increase opacity of next_fs to 1 as it moves in
  31.             opacity = 1 - now;
  32.             current_fs.css({'transform': 'scale('+scale+')'});
  33.             next_fs.css({'left': left, 'opacity': opacity});
  34.         },
  35.         duration: 800,
  36.         complete: function(){
  37.             current_fs.hide();
  38.             animating = false;
  39.         },
  40.         //this comes from the custom easing plugin
  41.         easing: 'easeInOutBack'
  42.     });
  43. });
  44.  
  45. $(".previous").click(function(){
  46.     if(animating) return false;
  47.     animating = true;
  48.    
  49.     current_fs = $(this).parent();
  50.     previous_fs = $(this).parent().prev();
  51.    
  52.     //de-activate current step on progressbar
  53.     $("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
  54.    
  55.     //show the previous fieldset
  56.     previous_fs.show();
  57.     //hide the current fieldset with style
  58.     current_fs.animate({opacity: 0}, {
  59.         step: function(now, mx) {
  60.             //as the opacity of current_fs reduces to 0 - stored in "now"
  61.             //1. scale previous_fs from 80% to 100%
  62.             scale = 0.8 + (1 - now) * 0.2;
  63.             //2. take current_fs to the right(50%) - from 0%
  64.             left = ((1-now) * 50)+"%";
  65.             //3. increase opacity of previous_fs to 1 as it moves in
  66.             opacity = 1 - now;
  67.             current_fs.css({'left': left});
  68.             previous_fs.css({'transform': 'scale('+scale+')', 'opacity': opacity});
  69.         },
  70.         duration: 800,
  71.         complete: function(){
  72.             current_fs.hide();
  73.             animating = false;
  74.         },
  75.         //this comes from the custom easing plugin
  76.         easing: 'easeInOutBack'
  77.     });
  78. });
  79.  
  80. $(".submit").click(function(){
  81.     return false;
  82. })