title: JQuery get img src and use it in a as data attribute
body: <p>I'm trying to use a javascript library which requires a specific HTML structure but unfortunately I am not allowed to change it. <br />
  The structure comes from a template and I have to work with what I have.<br/>
  The point is that I try to copy every image's src and put it in  as data-largesrc="image/source/here".<br/>
  Any clue how I could do this? I have this until now but it's not working as intended:</p>
  
  <pre><code>$(document).ready(function () {
      $("a").attr('data-largesrc', "'" + $("a").children().attr('src')) + "'");
  });
  </code></pre>
  
  <p>And the HTML structure is like this:</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div id="products" class="productsList main"&gt;
          &lt;ul id="og-grid" class="list og-grid"&gt;
              &lt;li class="l1 i1 column1"&gt;
                  &lt;a href="?17,barracuda-email-security-gateway" tabindex="-1"&gt;
                      &lt;img src="files/150/BARRACUDAESG.jpg.png" alt="BARRACUDAESG.jpg.png"&gt;
                  &lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm sure this should be solved rather easy but I can't seem to find a solution. Thank you very much if you can help me!</p>