{"action":"created","issue":{"url":"https://api.github.com/repos/jbutko/stickyNavbar.js/issues/16","labels_url":"https://api.github.com/repos/jbutko/stickyNavbar.js/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/jbutko/stickyNavbar.js/issues/16/comments","events_url":"https://api.github.com/repos/jbutko/stickyNavbar.js/issues/16/events","html_url":"https://github.com/jbutko/stickyNavbar.js/issues/16","id":41021406,"number":16,"title":"Sidebar in the middle of page on pageload","user":{"login":"Globegitter","id":2580254,"avatar_url":"https://avatars.githubusercontent.com/u/2580254?v=3","gravatar_id":"","url":"https://api.github.com/users/Globegitter","html_url":"https://github.com/Globegitter","followers_url":"https://api.github.com/users/Globegitter/followers","following_url":"https://api.github.com/users/Globegitter/following{/other_user}","gists_url":"https://api.github.com/users/Globegitter/gists{/gist_id}","starred_url":"https://api.github.com/users/Globegitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Globegitter/subscriptions","organizations_url":"https://api.github.com/users/Globegitter/orgs","repos_url":"https://api.github.com/users/Globegitter/repos","events_url":"https://api.github.com/users/Globegitter/events{/privacy}","received_events_url":"https://api.github.com/users/Globegitter/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-08-24T22:11:47Z","updated_at":"2015-01-04T12:44:58Z","closed_at":"2014-09-11T15:15:32Z","body":"If my page is scrolled down and I refresh the page, the navbar is something just randomly in the middle of the page.\r\n![capture d ecran 2014-08-24 a 23 10 30](https://cloud.githubusercontent.com/assets/2580254/4024824/98438174-2bdb-11e4-9047-5b2b1d6c3888.png)\r\nHere you can see the signup button, etc in the middle of the page."},"comment":{"url":"https://api.github.com/repos/jbutko/stickyNavbar.js/issues/comments/68631629","html_url":"https://github.com/jbutko/stickyNavbar.js/issues/16#issuecomment-68631629","issue_url":"https://api.github.com/repos/jbutko/stickyNavbar.js/issues/16","id":68631629,"user":{"login":"jbutko","id":4448836,"avatar_url":"https://avatars.githubusercontent.com/u/4448836?v=3","gravatar_id":"","url":"https://api.github.com/users/jbutko","html_url":"https://github.com/jbutko","followers_url":"https://api.github.com/users/jbutko/followers","following_url":"https://api.github.com/users/jbutko/following{/other_user}","gists_url":"https://api.github.com/users/jbutko/gists{/gist_id}","starred_url":"https://api.github.com/users/jbutko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbutko/subscriptions","organizations_url":"https://api.github.com/users/jbutko/orgs","repos_url":"https://api.github.com/users/jbutko/repos","events_url":"https://api.github.com/users/jbutko/events{/privacy}","received_events_url":"https://api.github.com/users/jbutko/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T12:44:58Z","updated_at":"2015-01-04T12:44:58Z","body":"@kaibakker: Hi, really not sure why this happened on your site, it looks like it is working fine on my demo page. Anyway you can probably fix it with this workaround (I do not tested it properly but it should work IMO):\r\n```js\r\nvar leftColVertPosition = $('.l-left').offset().top,\r\n    windowVerticalPos = $(window).scrollTop(),\r\n    menuBar = $('#menubar');\r\n\r\nif (windowVerticalPos > leftColVertPosition) {\r\n  menuBar.style.top = \"0\";\r\n}\r\n\r\nTry it, adapt it if needed and let me know."}}