title: How to add class to div depending on url in Javascript?
body: <p>How do I add a class to a specific class on a specific page using pure Javascript? I've played around with a number of different code-snippets but can't manage to get anything to work. I'm looking for something like the following:</p>
  
  <pre><code>&lt;script&gt;
      if (window.location.href == 'http://specific-page.com') {
        $(somecode).find('existingClass').addClass('newClass');
     };
  &lt;/script&gt;
  </code></pre>