title: Output variable inside an href - Javascript
body: <p>I am using Magnific Popup for my gallery. When you click on a thumbnail, it popups the image. I am trying to add a "Download image" button inside the popup. I have the HTML snippet displaying fine, but the href of the download link needs to be populated with the img url.</p>
  
  <p>Here is the JS code:</p>
  
  <pre><code>markup: '&lt;div class="mfp-figure"&gt;'+
                  '&lt;div class="mfp-close"&gt;&lt;/div&gt;'+
                  '&lt;div class="download-img"&gt;&lt;a href="#"&gt;Download image&lt;/a&gt;&lt;/div&gt;'+
                  '&lt;figure&gt;'+
                      '&lt;div class="mfp-img"&gt;&lt;/div&gt;'+
                      '&lt;figcaption&gt;'+
                          '&lt;div class="mfp-bottom-bar"&gt;'+
                              '&lt;div class="mfp-title"&gt;&lt;/div&gt;'+
                              '&lt;div class="mfp-counter"&gt;&lt;/div&gt;'+
                          '&lt;/div&gt;'+
                      '&lt;/figcaption&gt;'+
                  '&lt;/figure&gt;'+
              '&lt;/div&gt;',
  </code></pre>
  
  <p>How do I put the image src variable in the anchor's href?</p>