{"comment":{"url":"https://api.github.com/repos/hahnzhu/parallax.js/comments/9635877","html_url":"https://github.com/hahnzhu/parallax.js/commit/4a918aff9f7d7eeec66cbf65442f57da5e27f6a2#commitcomment-9635877","id":9635877,"user":{"login":"diamont1001","id":7159888,"avatar_url":"https://avatars.githubusercontent.com/u/7159888?v=3","gravatar_id":"","url":"https://api.github.com/users/diamont1001","html_url":"https://github.com/diamont1001","followers_url":"https://api.github.com/users/diamont1001/followers","following_url":"https://api.github.com/users/diamont1001/following{/other_user}","gists_url":"https://api.github.com/users/diamont1001/gists{/gist_id}","starred_url":"https://api.github.com/users/diamont1001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diamont1001/subscriptions","organizations_url":"https://api.github.com/users/diamont1001/orgs","repos_url":"https://api.github.com/users/diamont1001/repos","events_url":"https://api.github.com/users/diamont1001/events{/privacy}","received_events_url":"https://api.github.com/users/diamont1001/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"4a918aff9f7d7eeec66cbf65442f57da5e27f6a2","created_at":"2015-02-07T07:27:17Z","updated_at":"2015-02-07T07:27:17Z","body":"目前发现了几个问题：\r\n\r\nresize后不会自动适应 \r\n解决方法：\r\n插件最后增加以下代码：\r\nwindow.addEventListener(\"resize\", function() {\r\nvar pageWidth = $(window).width(), // 获取手机屏幕宽度\r\npageHeight = $(window).height(); // 获取手机屏幕高度\r\n$pageArr.css({ // 初始化 page 宽高\r\n'width': pageWidth + 'px',\r\n'height': pageHeight + 'px'\r\n});\r\n}, false);\r\n\r\n对于某些安卓机子Webview，第一次取屏幕大小会为0，增加延时1S再初始化插件，插件会报异常。\r\n解决方法：\r\n$(window).on(\"load\", function() {});这个消息响改成函数体allOnload()，并在init()函数里最后调用allOnload()\r\n\r\n快速上下滑动页面几次，可能会导致整个页面不见了的情况\r\n\r\n解决方法：未知"}}