zepto-refresh
zepto-refresh copied to clipboard
hybrid开发android 4.3.0以下 滚动加载更多height bug
hybrid开发android 4.3.0以下 滚动加载更多height bug zepto
$(window).height() // 获取值:240
解决方案:
var viewHeight = $(window).height(); var isAndroid = /android/i.test( navigator.userAgent.toLowerCase() ) || /Linux/i.test( navigator.userAgent.toLowerCase() ); // android 4.3以下window高度问题 if(isAndroid) { var screenHeight = window.screen.height - 100; viewHeight = Math.max(viewHeight, screenHeight); }