...
|
...
|
@@ -9,7 +9,7 @@ var $ = require('yoho-jquery'); |
|
|
var $returnTop = $('.return-top');
|
|
|
|
|
|
function showOrNot() {
|
|
|
if ($(window).height() > $(document).height()) {
|
|
|
if ($(window).height() >= $(document).height()) {
|
|
|
$returnTop.addClass('hide');
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -28,4 +28,9 @@ $(window).scroll(function() { |
|
|
}
|
|
|
});
|
|
|
|
|
|
// 页面图片加载完成后根据页面高度决定是否显示
|
|
|
if ($returnTop.hasClass('hide')) {
|
|
|
$('img').load(showOrNot);
|
|
|
}
|
|
|
|
|
|
exports.returnTopShowOrNot = showOrNot; |
...
|
...
|
|