提交 60b9d41c 编写于 作者: J Johan Preynat

Use platform.isSmallScreen() to get correct $scroller element

上级 3feda636
......@@ -12,7 +12,7 @@ var usePushState = (typeof history.pushState !== 'undefined');
Get current scroller element
*/
function getScroller() {
if (platform.isMobile()) {
if (platform.isSmallScreen()) {
return $('.book-body');
} else {
return $('.body-inner');
......
var $ = require('jquery');
module.exports = {
isMobile: function() {
return ($(document).width() <= 600);
},
// Breakpoint for navigation links position
isSmallScreen: function() {
return ($(document).width() <= 1240);
}
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册