Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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