title: Displaying "Download Image" caption on popup image
body: <p>At the moment the javascript code below is used to display a caption on an image popup </p>
  
  <pre><code>if ($(obj).attr("title") != "") {
  $("&lt;span class=\"caption\"&gt;" + $(obj).attr("title") + "&lt;/span&gt;").appendTo("#" + _17.popupId + "_content").hide();}
  </code></pre>
  
  <p>I need for it to display "download image" instead of the current output which is:</p>
  
  <p><code>&lt;span class="caption"&gt;Title&lt;/span&gt;</code></p>
  
  <p>how do I convert the following javascript code into displaying the below output:</p>
  
  <p><code>&lt;a href="rel" download&gt;Download image&lt;/a&gt;</code></p>
  
  <p>I've tried the following and had no luck</p>
  
  <pre><code>if ($(obj).attr("title") != "") {
                    $("&lt;a class=\"caption\" href=\"#\" download="rel"&gt;" + $(obj).attr("title") + "&lt;/a&gt;").appendTo("#" + _17.popupId + "_content").hide();
                 }
  </code></pre>