update,
This commit is contained in:
5
it114105/itp4513/Assignment/18-19/js/all.min.js
vendored
Normal file
5
it114105/itp4513/Assignment/18-19/js/all.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
it114105/itp4513/Assignment/18-19/js/bootstrap.min.js
vendored
Normal file
7
it114105/itp4513/Assignment/18-19/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
it114105/itp4513/Assignment/18-19/js/jquery.easing.min.js
vendored
Normal file
1
it114105/itp4513/Assignment/18-19/js/jquery.easing.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(n){"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e)}):"object"==typeof module&&"object"==typeof module.exports?exports=n(require("jquery")):n(jQuery)}(function(n){function e(n){var e=7.5625,t=2.75;return n<1/t?e*n*n:n<2/t?e*(n-=1.5/t)*n+.75:n<2.5/t?e*(n-=2.25/t)*n+.9375:e*(n-=2.625/t)*n+.984375}void 0!==n.easing&&(n.easing.jswing=n.easing.swing);var t=Math.pow,u=Math.sqrt,r=Math.sin,i=Math.cos,a=Math.PI,c=1.70158,o=1.525*c,s=2*a/3,f=2*a/4.5;n.extend(n.easing,{def:"easeOutQuad",swing:function(e){return n.easing[n.easing.def](e)},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(n){return n<.5?2*n*n:1-t(-2*n+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return 1-t(1-n,3)},easeInOutCubic:function(n){return n<.5?4*n*n*n:1-t(-2*n+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1-t(1-n,4)},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-t(-2*n+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1-t(1-n,5)},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1-t(-2*n+2,5)/2},easeInSine:function(n){return 1-i(n*a/2)},easeOutSine:function(n){return r(n*a/2)},easeInOutSine:function(n){return-(i(a*n)-1)/2},easeInExpo:function(n){return 0===n?0:t(2,10*n-10)},easeOutExpo:function(n){return 1===n?1:1-t(2,-10*n)},easeInOutExpo:function(n){return 0===n?0:1===n?1:n<.5?t(2,20*n-10)/2:(2-t(2,-20*n+10))/2},easeInCirc:function(n){return 1-u(1-t(n,2))},easeOutCirc:function(n){return u(1-t(n-1,2))},easeInOutCirc:function(n){return n<.5?(1-u(1-t(2*n,2)))/2:(u(1-t(-2*n+2,2))+1)/2},easeInElastic:function(n){return 0===n?0:1===n?1:-t(2,10*n-10)*r((10*n-10.75)*s)},easeOutElastic:function(n){return 0===n?0:1===n?1:t(2,-10*n)*r((10*n-.75)*s)+1},easeInOutElastic:function(n){return 0===n?0:1===n?1:n<.5?-(t(2,20*n-10)*r((20*n-11.125)*f))/2:t(2,-20*n+10)*r((20*n-11.125)*f)/2+1},easeInBack:function(n){return(c+1)*n*n*n-c*n*n},easeOutBack:function(n){return 1+(c+1)*t(n-1,3)+c*t(n-1,2)},easeInOutBack:function(n){return n<.5?t(2*n,2)*(7.189819*n-o)/2:(t(2*n-2,2)*((o+1)*(2*n-2)+o)+2)/2},easeInBounce:function(n){return 1-e(1-n)},easeOutBounce:e,easeInOutBounce:function(n){return n<.5?(1-e(1-2*n))/2:(1+e(2*n-1))/2}})});
|
2
it114105/itp4513/Assignment/18-19/js/jquery.min.js
vendored
Normal file
2
it114105/itp4513/Assignment/18-19/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
80
it114105/itp4513/Assignment/18-19/js/multiForm.js
Normal file
80
it114105/itp4513/Assignment/18-19/js/multiForm.js
Normal file
@@ -0,0 +1,80 @@
|
||||
var current_fs, next_fs, previous_fs; //fieldsets
|
||||
var left, opacity, scale; //fieldset properties which we will animate
|
||||
var animating; //flag to prevent quick multi-click glitches
|
||||
|
||||
$(".next").click(function(){
|
||||
if(animating) return false;
|
||||
animating = true;
|
||||
|
||||
current_fs = $(this).parent();
|
||||
next_fs = $(this).parent().next();
|
||||
|
||||
//activate next step on progressbar using the index of next_fs
|
||||
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
|
||||
|
||||
//show the next fieldset
|
||||
next_fs.show();
|
||||
//hide the current fieldset with style
|
||||
current_fs.animate({opacity: 0}, {
|
||||
step: function(now, mx) {
|
||||
//as the opacity of current_fs reduces to 0 - stored in "now"
|
||||
//1. scale current_fs down to 80%
|
||||
scale = 1 - (1 - now) * 0.2;
|
||||
//2. bring next_fs from the right(50%)
|
||||
left = (now * 50)+"%";
|
||||
//3. increase opacity of next_fs to 1 as it moves in
|
||||
opacity = 1 - now;
|
||||
current_fs.css({
|
||||
'transform': 'scale('+scale+')',
|
||||
'position': 'absolute'
|
||||
});
|
||||
next_fs.css({'left': left, 'opacity': opacity});
|
||||
},
|
||||
duration: 800,
|
||||
complete: function(){
|
||||
current_fs.hide();
|
||||
animating = false;
|
||||
},
|
||||
//this comes from the custom easing plugin
|
||||
easing: 'easeInOutBack'
|
||||
});
|
||||
});
|
||||
|
||||
$(".previous").click(function(){
|
||||
if(animating) return false;
|
||||
animating = true;
|
||||
|
||||
current_fs = $(this).parent();
|
||||
previous_fs = $(this).parent().prev();
|
||||
|
||||
//de-activate current step on progressbar
|
||||
$("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
|
||||
|
||||
//show the previous fieldset
|
||||
previous_fs.show();
|
||||
//hide the current fieldset with style
|
||||
current_fs.animate({opacity: 0}, {
|
||||
step: function(now, mx) {
|
||||
//as the opacity of current_fs reduces to 0 - stored in "now"
|
||||
//1. scale previous_fs from 80% to 100%
|
||||
scale = 0.8 + (1 - now) * 0.2;
|
||||
//2. take current_fs to the right(50%) - from 0%
|
||||
left = ((1-now) * 50)+"%";
|
||||
//3. increase opacity of previous_fs to 1 as it moves in
|
||||
opacity = 1 - now;
|
||||
current_fs.css({'left': left});
|
||||
previous_fs.css({'transform': 'scale('+scale+')', 'opacity': opacity});
|
||||
},
|
||||
duration: 800,
|
||||
complete: function(){
|
||||
current_fs.hide();
|
||||
animating = false;
|
||||
},
|
||||
//this comes from the custom easing plugin
|
||||
easing: 'easeInOutBack'
|
||||
});
|
||||
});
|
||||
|
||||
$(".submit").click(function(){
|
||||
return false;
|
||||
})
|
Reference in New Issue
Block a user