title: I want to replace H2 tag by link with Javascript
body: <p>I want to replace H2 tag by link with Javascript.</p>
  <p>So the tag looks like:</p>
  <pre><code>&lt;h2&gt;Categories&lt;/h2&gt;
  </code></pre>
  <p>I expect as output:</p>
  <pre><code>&lt;a href=&quot;#&quot;&gt;Categories&lt;/a&gt;
  </code></pre>
  <p>How can I do that? Is it possible?</p>
  <p>The code I tried, but with no success:</p>
  <pre><code>$(&quot;#categories&quot;).find(&quot;h2&quot;).replaceWith($('&lt;a href=&quot;#&quot;&gt;&lt;/a&gt;'));
  </code></pre>