Commit 61086aa 1 parent 43dd4b4 commit 61086aa Copy full SHA for 61086aa
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ NexT.utils = NexT.$u = {
102
102
$top . toggleClass ( 'back-to-top-on' , window . pageYOffset > THRESHOLD ) ;
103
103
104
104
var scrollTop = $ ( window ) . scrollTop ( ) ;
105
- var contentHeight = NexT . utils . getContentHeight ( ) ;
106
- var scrollPercent = ( scrollTop ) / ( contentHeight ) ;
105
+ var contentVisibilityHeight = NexT . utils . getContentVisibilityHeight ( ) ;
106
+ var scrollPercent = ( scrollTop ) / ( contentVisibilityHeight ) ;
107
107
var scrollPercentRounded = Math . round ( scrollPercent * 100 ) ;
108
108
var scrollPercentMaxed = ( scrollPercentRounded > 100 ) ? 100 : scrollPercentRounded ;
109
109
$ ( '#scrollpercent>span' ) . html ( scrollPercentMaxed ) ;
@@ -263,12 +263,12 @@ NexT.utils = NexT.$u = {
263
263
return scrollbarWidth ;
264
264
} ,
265
265
266
- getContentHeight : function ( ) {
266
+ getContentVisibilityHeight : function ( ) {
267
267
var docHeight = $ ( '#content' ) . height ( ) ,
268
268
winHeight = $ ( window ) . height ( ) ,
269
- contentHeight = ( docHeight > winHeight ) ? ( docHeight - winHeight ) : ( $ ( document ) . height ( ) - winHeight ) ;
269
+ contentVisibilityHeight = ( docHeight > winHeight ) ? ( docHeight - winHeight ) : ( $ ( document ) . height ( ) - winHeight ) ;
270
270
271
- return contentHeight ;
271
+ return contentVisibilityHeight ;
272
272
} ,
273
273
274
274
/**
You can’t perform that action at this time.
0 commit comments