Skip to content

Commit 61086aa

Browse files
authored
MOD: rename getContentHeight function.
1 parent 43dd4b4 commit 61086aa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/js/src/utils.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ NexT.utils = NexT.$u = {
102102
$top.toggleClass('back-to-top-on', window.pageYOffset > THRESHOLD);
103103

104104
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);
107107
var scrollPercentRounded = Math.round(scrollPercent*100);
108108
var scrollPercentMaxed = (scrollPercentRounded > 100) ? 100 : scrollPercentRounded;
109109
$('#scrollpercent>span').html(scrollPercentMaxed);
@@ -263,12 +263,12 @@ NexT.utils = NexT.$u = {
263263
return scrollbarWidth;
264264
},
265265

266-
getContentHeight: function () {
266+
getContentVisibilityHeight: function () {
267267
var docHeight = $('#content').height(),
268268
winHeight = $(window).height(),
269-
contentHeight = (docHeight > winHeight) ? (docHeight - winHeight) : ($(document).height() - winHeight);
269+
contentVisibilityHeight = (docHeight > winHeight) ? (docHeight - winHeight) : ($(document).height() - winHeight);
270270

271-
return contentHeight;
271+
return contentVisibilityHeight;
272272
},
273273

274274
/**

0 commit comments

Comments
 (0)