add class to regex jquery, on index page
<p>referring to this question: </p>

<p><a href="http://stackoverflow.com/questions/9538476/add-class-to-regex-jquery/9538545">add class to regex jquery</a> </p>

<p>I would like to know how to use this code for pages like <code>http://www.mydomain.com</code> or <code>http://localhost/</code> or <code>http://localhost:3000/</code> or any index page.</p>

<p>The code example is this for <code>http://localhost/username/boards</code></p>

<pre><code>if( /^\/[^/]+\/boards/.test(location.pathname) ) {
     $("#container ul #all_categories a.categories-menu").css("font-weight","bold");
}
</code></pre>
