referring to this question:
I would like to know how to use this code for pages like http://www.mydomain.com or http://localhost/ or http://localhost:3000/ or any index page.
The code example is this for http://localhost/username/boards
if( /^\/[^/]+\/boards/.test(location.pathname) ) {
$("#container ul #all_categories a.categories-menu").css("font-weight","bold");
}
/) ;)/:D. I havewindow.location.href == "http://localhost:3000/"but it is difficult to maintain :( if I deploy the server in production mode withhttp://www.mydomain.comif(location.pathname === '/')will work just fine.