jQuery change multiple attr inside wrapInner
<p>How can I get multiple attributes values?
I can get <code>href</code> correctly, I also want to get <code>alt</code>, but I cannot figure it out correctly and and get a right result.
I tried <code>.attr('href').attr('alt')</code> <code>.attr('href' + 'alt')</code> and also <code>.attr({href, alt})</code>, </p>

<p>Here is the online sample:
<a href="http://jsfiddle.net/Lm4TM/" rel="nofollow">http://jsfiddle.net/Lm4TM/</a></p>

<p><strong>JS:</strong></p>

<pre><code>$(document).ready(function(){
    $(".link").each(function (i) {
        var links = $(this).find("a");
        $(this).wrapInner("&lt;a href='"+ $(links).attr('href') + "'&gt;&lt;/a&gt;");
    });
});
</code></pre>

<p><strong>CSS:</strong></p>

<pre><code>.link {
  width:20%;
  height: 100%;
  background: red;
  float: left;
  margin: 0 20px;
}

a {
  text-decoration: none;
  color: white;
}
</code></pre>

<p><strong>HTML:</strong></p>

<pre><code>&lt;div class="link"&gt;
&lt;a href="http://www.google.com" alt="google"&gt;Google.com&lt;/a&gt;
&lt;p&gt; Google Inc. is an American multinational corporation that provides Internet-related products and services, including internet search, cloud computing, software and advertising technologies.Advertising revenues from AdWords generate almost all of the company's profits&lt;/p&gt;
&lt;/div&gt;

&lt;div class="link"&gt;
&lt;a href="http://www.microsoft.com" alt="microsoft"&gt;Microsoft.com&lt;/a&gt;
&lt;p&gt;Microsoft Corporation is an American multinational software corporation headquartered in Redmond, Washington that develops, manufactures, licenses, and supports a wide range of products and services related to computing.&lt;/p&gt;
&lt;/div&gt;

&lt;div class="link"&gt;
&lt;a href="http://www.Apple.com" alt="Apple"&gt;Microsoft.com&lt;/a&gt;
&lt;p&gt;The apple is the pomaceous fruit of the apple tree, species Malus domestica in the rose family (Rosaceae). It is one of the most widely cultivated tree fruits, and the most widely known of the many members of genus Malus that are used by humans.&lt;/p&gt;
&lt;/div&gt;
</code></pre>
