title: jQuery if Location.Pathname contains
body: <p>I am currently using the following code to target individual pages such as <em><a href="http://my-website.com/about/" rel="noreferrer">http://my-website.com/about/</a></em></p>
  
  <pre><code>    if (document.location.pathname == "/about/") {
          //Code goes here
      }
  </code></pre>
  
  <p>I am wondering how to do the same for all pages that have a certain parent page such as <code>/about/</code>in the following examples..</p>
  
  <p><a href="http://my-website.com/about/child-page1" rel="noreferrer">http://my-website.com/about/child-page1</a></p>
  
  <p><a href="http://my-website.com/about/child-page2" rel="noreferrer">http://my-website.com/about/child-page2</a></p>