{"action":"created","issue":{"url":"https://api.github.com/repos/DobyTang/LazyLibrarian/issues/326","repository_url":"https://api.github.com/repos/DobyTang/LazyLibrarian","labels_url":"https://api.github.com/repos/DobyTang/LazyLibrarian/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/DobyTang/LazyLibrarian/issues/326/comments","events_url":"https://api.github.com/repos/DobyTang/LazyLibrarian/issues/326/events","html_url":"https://github.com/DobyTang/LazyLibrarian/issues/326","id":143530089,"number":326,"title":"js errors from nav.js","user":{"login":"knobunc","id":10033853,"avatar_url":"https://avatars.githubusercontent.com/u/10033853?v=3","gravatar_id":"","url":"https://api.github.com/users/knobunc","html_url":"https://github.com/knobunc","followers_url":"https://api.github.com/users/knobunc/followers","following_url":"https://api.github.com/users/knobunc/following{/other_user}","gists_url":"https://api.github.com/users/knobunc/gists{/gist_id}","starred_url":"https://api.github.com/users/knobunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knobunc/subscriptions","organizations_url":"https://api.github.com/users/knobunc/orgs","repos_url":"https://api.github.com/users/knobunc/repos","events_url":"https://api.github.com/users/knobunc/events{/privacy}","received_events_url":"https://api.github.com/users/knobunc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-25T15:59:36Z","updated_at":"2016-04-01T15:56:20Z","closed_at":null,"body":"nav.js errors because the box variable is not defined. The box variable is not defined because the navbar doesn't have IDs on the items.\r\n\r\nThis is a cleaner way to do it:\r\n\r\n```javascript\r\n$(document).ready(function() {\r\n    // get document url\r\n    var docURL = document.URL;\r\n\t\r\n    // reset class of nav links\r\n    $(\"#navbardiv a\").removeClass(\"navactive\");\r\n\r\n    // pull our page\r\n    var page = location.pathname.substring( location.pathname.lastIndexOf(\"/\") + 1 );\r\n\r\n    // add active class\r\n    $(\"#navbardiv a:not(.navbarlogo)[href=\\\"\"+page+\"\\\"]\").addClass(\"navactive\");\r\n});\r\n```\r\nBut... since the navbar is made of images, they are hard to style.  Would it make sense to flip the navbar back to use styled text?  And then the active button can be highlighted?\r\n\r\nOtherwise, if you don't want to do that, just pull nav.js from the site...\r\n"},"comment":{"url":"https://api.github.com/repos/DobyTang/LazyLibrarian/issues/comments/204448401","html_url":"https://github.com/DobyTang/LazyLibrarian/issues/326#issuecomment-204448401","issue_url":"https://api.github.com/repos/DobyTang/LazyLibrarian/issues/326","id":204448401,"user":{"login":"philborman","id":12158777,"avatar_url":"https://avatars.githubusercontent.com/u/12158777?v=3","gravatar_id":"","url":"https://api.github.com/users/philborman","html_url":"https://github.com/philborman","followers_url":"https://api.github.com/users/philborman/followers","following_url":"https://api.github.com/users/philborman/following{/other_user}","gists_url":"https://api.github.com/users/philborman/gists{/gist_id}","starred_url":"https://api.github.com/users/philborman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philborman/subscriptions","organizations_url":"https://api.github.com/users/philborman/orgs","repos_url":"https://api.github.com/users/philborman/repos","events_url":"https://api.github.com/users/philborman/events{/privacy}","received_events_url":"https://api.github.com/users/philborman/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T15:56:20Z","updated_at":"2016-04-01T15:56:20Z","body":"That would be great thanks, html/css is something I've not really played \nwith\n\nOn 01/04/16 15:53, Ben Bennett wrote:\n>\n> Yeah, if I get time to mess with it, it will change the css and the \n> html and lose the images.\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly or view it on GitHub \n> <https://github.com/DobyTang/LazyLibrarian/issues/326#issuecomment-204404533>\n>\n\n"}}