How to add JavaScript if the URL has a certain word?
<p>I want to add the the following jQuery to the following pages only.</p>

<pre><code>http://www.mywebsite.com/check-8.asp 

http://www.mywebsite.com/edit-8.asp

http://www.mywebsite.com/cart-8.asp
</code></pre>

<p>So this means I want to add it where URL string contains either <code>check-8</code>, <code>cart-8</code> or <code>edit-8</code>. </p>

<p>What is the best way with jQuery or JavaScript?</p>

<pre><code>var text = $('#system td.td-main').html();

if (text != null)
{
  var newtext = text.replace("Pris","&lt;div id=\"pricebox\"&gt;Pris").replace("mva\)","mva\)&lt;/div&gt;");
  $('#system td.td-main').html(newtext);
}
</code></pre>

<p>Thanks in advance.</p>
