@@ -17,6 +17,7 @@ $(function(){
17
17
} ) ;
18
18
} ) ;
19
19
function checkProfileSize ( arg ) {
20
+ arg = arg || { } ;
20
21
$ ( '#upload-profile-image' ) . attr ( 'src' , '' ) ;
21
22
$ ( '#upload-profile-file-info' ) . html ( '' ) ;
22
23
$ ( '#upload-profile-error' ) . html ( '' ) ;
@@ -88,6 +89,7 @@ $(function(){
88
89
} ) ;
89
90
} ) ;
90
91
function checkProfileSize1 ( arg ) {
92
+ arg = arg || { } ;
91
93
$ ( '#upload-profile-image-1' ) . attr ( 'src' , '' ) ;
92
94
$ ( '#upload-profile-file-info-1' ) . html ( '' ) ;
93
95
$ ( '#upload-profile-error-1' ) . html ( '' ) ;
@@ -160,6 +162,7 @@ $(function(){
160
162
} ) ;
161
163
} ) ;
162
164
function checkProfileSize2 ( arg ) {
165
+ arg = arg || { } ;
163
166
$ ( '#upload-profile-image-2' ) . attr ( 'src' , '' ) ;
164
167
$ ( '#upload-profile-file-info-2' ) . html ( '' ) ;
165
168
$ ( '#upload-profile-error-2' ) . html ( '' ) ;
@@ -318,5 +321,22 @@ $(function(){
318
321
hideTooltip ( $ ( this ) ) ;
319
322
} ) ;
320
323
324
+ } ) ;
321
325
326
+ // To smooth scroll hash
327
+ $ ( function ( ) {
328
+ $ ( "nav ul li a[href^='#']" ) . on ( 'click' , function ( e ) {
329
+ // prevent default anchor click behavior
330
+ e . preventDefault ( ) ;
331
+ // store hash
332
+ var hash = this . hash ;
333
+ // animate
334
+ $ ( 'html, body' ) . animate ( {
335
+ scrollTop : $ ( hash ) . offset ( ) . top
336
+ } , 500 , function ( ) {
337
+ // when done, add hash to url
338
+ // (default click behaviour)
339
+ window . location . hash = hash ;
340
+ } ) ;
341
+ } ) ;
322
342
} ) ;
0 commit comments