File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,3 +107,19 @@ NProgress.start();
107107// end loading bar
108108NProgress . done ( ) ;
109109
110+
111+ /***********************************************
112+ * Animation Settings
113+ ***********************************************/
114+
115+ function setAnimation ( options ) {
116+ var animationName = "animated " + options . name ;
117+ var animationEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend" ;
118+ $ ( options . selector )
119+ . addClass ( animationName )
120+ . one ( animationEnd ,
121+ function ( ) {
122+ $ ( this ) . removeClass ( animationName ) ;
123+ }
124+ ) ;
125+ }
Original file line number Diff line number Diff line change 1- $ ( '.nav-profile > li > a' ) . on ( 'click' , function ( ) {
1+ $ ( function ( ) {
2+ $ ( '.nav-profile > li > a' ) . on ( 'click' , function ( ) {
23
3- var animationName = "animated flipInX" ;
4- var animationEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend" ;
5-
6- $ ( this ) . next ( )
7- . addClass ( animationName )
8- . one ( animationEnd ,
9- function ( ) {
10- $ ( this ) . removeClass ( animationName ) ;
11- }
12- ) ;
13- } ) ;
4+ var $el = $ ( this ) . next ( ) ;
5+ setAnimation ( {
6+ name : 'flipInX' ,
7+ selector : $el
8+ } ) ;
9+ } ) ;
10+ } )
Original file line number Diff line number Diff line change 1+ $ ( function ( ) {
2+ setAnimation ( {
3+ name : 'pulse' ,
4+ selector : '.auth-container > .panel'
5+ } ) ;
6+ } )
Original file line number Diff line number Diff line change @@ -20,7 +20,13 @@ $(function() {
2020 } ,
2121 password : "Please enter password" ,
2222 agree : "Please accept our policy"
23- }
23+ } ,
24+ invalidHandler : function ( ) {
25+ setAnimation ( {
26+ name : 'shake' ,
27+ selector : '.auth-container > .panel'
28+ } ) ;
29+ }
2430 }
2531
2632 $ . extend ( loginValidationSettings , validationDefaultSettings ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,13 @@ $(function() {
1616 required : "Please enter email address" ,
1717 email : "Please enter a valid email address"
1818 }
19- }
19+ } ,
20+ invalidHandler : function ( ) {
21+ setAnimation ( {
22+ name : 'shake' ,
23+ selector : '.auth-container > .panel'
24+ } ) ;
25+ }
2026 }
2127
2228 $ . extend ( resetValidationSettings , validationDefaultSettings ) ;
Original file line number Diff line number Diff line change @@ -73,7 +73,13 @@ $(function() {
7373 minlength : "Passwords should be at least 8 characters."
7474 } ,
7575 agree : "Please accept our policy"
76- }
76+ } ,
77+ invalidHandler : function ( ) {
78+ setAnimation ( {
79+ name : 'shake' ,
80+ selector : '.auth-container > .panel'
81+ } ) ;
82+ }
7783 }
7884
7985 $ . extend ( signupValidationSettings , validationDefaultSettings ) ;
You can’t perform that action at this time.
0 commit comments