title: How can I append address to <a> tag href
body: <p>I use bxslider4 and captions is enabled. I want to add link to captions. I done it some but it is applied for just first one. How can I append all links to each captions. I have edited bxslider javascript file.</p>
  
  <p>My slider php code:</p>
  
  <pre><code>foreach ($manset_images as $man_img =&gt; $value2) {
                                                    ?&gt;
  
          &lt;div&gt;
              &lt;a  id="slayt_resim_link" href="index.php?url=content&amp;id=&lt;?=$value2-&gt;content_id; ?&gt;"&gt;
                  &lt;img src="&lt;?php echo URL; ?&gt;public/upload/&lt;?=$value2-&gt;content_foto?&gt;" title="&lt;?=$value2-&gt;content_title?&gt;" data-url="index.php?url=content&amp;id=&lt;?=$value2-&gt;content_id; ?&gt;" style="width:100%; height: 350px;"&gt;                                
              &lt;/a&gt;
          &lt;/div&gt;
  
      &lt;?php 
      }
  ?&gt;
  
  </code></pre>
  
  <p>I added below code to original bxslider javascript file to get image link and change caption href:</p>
  
  <pre><code>    // find image link
      var captionLink = $this(this)$(slayt_resim_link).attr('href');
      $('#manset_caption_link').attr('href', captionLink);
  </code></pre>
  
  <p>This code provides apply for the first caption. I think I can solve the problem if I add captionLink to href="" 
  <code>&lt;a id="manset_caption_link" href=""&gt;</code>  but I dont know How can I do.</p>
  
  <p>Last state of the javascript code:</p>
  
  <pre><code>
  // bxslider javascript file 719. line   
   /**
       * Appends image captions to the DOM
       */
      var appendCaptions = function() {
        // cycle through each child
        slider.children.each(function(index) {
          // get the image title attribute
          var title = $(this).find('img:first').attr('title');
  
  
  //------------------ added after ----------------------------
          // find image link
          var captionLink = $this(this)$(slayt_resim_link).attr('href');
          $('#manset_caption_link').attr('href', captionLink);
  //------------------------------------------------------------
  
          // append the caption
          if (title !== undefined &amp;&amp; ('' + title).length) {
            $(this).append('&lt;div class="bx-caption"&gt;&lt;a id="manset_caption_link" href="---Add captionLink---!!!!!"&gt;&lt;span&gt;' + title + '&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;');
          }
  
        });
      };
  </code></pre>