title: How can I copy a URL from an image's src attribute to an href attribute in jQuery?
body: <p>This is my HTML code</p>
  
  <pre><code>&lt;div class="anythingWindow"&gt;
      &lt;ul class="anythingSlider"&gt;
        &lt;li class="panel activePage"&gt;
          &lt;div class="content clearfix" style="width: 100%; height: 100%;"&gt;
            &lt;a href="http://www.example.com/a.jpg" class="focusedLink"&gt;
              &lt;img src= "http://www.example.com/a.jpg"/&gt;
            &lt;/a&gt;
            &lt;div class="slider-text"&gt;
              Lorem ipsum dolor sit amet, consectetur adipisicing elit
              &lt;a title="" href="#"&gt;Read More&lt;/a&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/li&gt;
  
        &lt;li class="panel activePage"&gt;
          &lt;div class="content clearfix" style="width: 100%; height: 100%;"&gt;
            &lt;a href="http://www.example.com/a.jpg" class="focusedLink"&gt;
              &lt;img src= "http://www.example.com/a.jpg"/&gt;
            &lt;/a&gt;
            &lt;div class="slider-text"&gt;
              Lorem ipsum dolor sit amet, consectetur adipisicing elit
              &lt;a title="" href="#"&gt;Read More&lt;/a&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>As you can see in <code>div.content &gt; a &gt; img</code> there is image with specific location. How can I copy the URL from this image to the <code>href</code> attribute of <code>div.slider-text &gt; a</code>? </p>
  
  <p>I tried jQuery's <code>each()</code> method, but couldn't get it to work.</p>