title: jQuery generate unique IDs
body: <p>Here's what I have: </p>
  
  <pre><code>&lt;a href="&lt;?=$arItem["LINK"]?&gt;"&gt;&lt;?=$arItem["TEXT"]?&gt;&lt;/a&gt;
  </code></pre>
  
  <p>It's a PHP array, which contains some links. I need to add an extra hash parameter <code>#nav-link</code> to the end of each link. </p>
  
  <p>Here's how I tried do it:</p>
  
  <pre><code>&lt;a id="likeLink" href=""&gt;&lt;?=$arItem["TEXT"]?&gt;&lt;/a&gt;
  &lt;script&gt;
      $(document).ready(function () {
          $("#likeLink").attr("href", &lt;?=$arItem["LINK"]?&gt; + "#nav-link");
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>But this code doesn't work because jQuery will not know which links I am linking to. So I guess that I need to generate the unique <code>ids</code>, but don't know how to do it.</p>