{"action":"opened","issue":{"url":"https://api.github.com/repos/Tronzo/Tech-loading/issues/12","repository_url":"https://api.github.com/repos/Tronzo/Tech-loading","labels_url":"https://api.github.com/repos/Tronzo/Tech-loading/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/Tronzo/Tech-loading/issues/12/comments","events_url":"https://api.github.com/repos/Tronzo/Tech-loading/issues/12/events","html_url":"https://github.com/Tronzo/Tech-loading/issues/12","id":178239744,"number":12,"title":"回到顶部按钮","user":{"login":"Tronzo","id":11907865,"avatar_url":"https://avatars.githubusercontent.com/u/11907865?v=3","gravatar_id":"","url":"https://api.github.com/users/Tronzo","html_url":"https://github.com/Tronzo","followers_url":"https://api.github.com/users/Tronzo/followers","following_url":"https://api.github.com/users/Tronzo/following{/other_user}","gists_url":"https://api.github.com/users/Tronzo/gists{/gist_id}","starred_url":"https://api.github.com/users/Tronzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tronzo/subscriptions","organizations_url":"https://api.github.com/users/Tronzo/orgs","repos_url":"https://api.github.com/users/Tronzo/repos","events_url":"https://api.github.com/users/Tronzo/events{/privacy}","received_events_url":"https://api.github.com/users/Tronzo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-21T03:54:55Z","updated_at":"2016-09-21T03:54:55Z","closed_at":null,"body":"通过使用 jQuery 中的 animate 和 scrollTop 方法，你无需插件便可创建一个简单地回到顶部动画：\r\n```javascript\r\n// Back to top\r\n$('a.top').click(function (e) {\r\n  e.preventDefault();\r\n  $(document.body).animate({scrollTop: 0}, 800);\r\n});\r\n```\r\n<!-- Create an anchor tag -->\r\n<a class=\"top\" href=\"#\">Back to top</a>\r\n将 scrollTop 的值改为你想要 scrollbar 停止的地方。然后你要做的就是，设置在 800 `毫秒内回到顶部。"}}
{"actor":{"display_login":"Tronzo"}}