jQuery appending attribute content
<p>I am creating a system of displaying link information in an interactive way using html attributes, and jQuery to move some of the HTML around. I am stuck trying to append a title attribute to a div. I've never done this with an attribute and am hitting some walls. </p>

<p>It's hard to explain, but you will see what I am after when you see the JS.
<a href="http://jsfiddle.net/KvAwa/" rel="nofollow">http://jsfiddle.net/KvAwa/</a></p>

<p>thx for any help in advance</p>

<p>The HTML</p>

<pre><code>&lt;div id="navtool"&gt;
    &lt;ul id="menu"&gt;
        &lt;li id="1"&gt;
            &lt;a href="location1.html" title="this is the decription1"&gt;This is the link1&lt;/a&gt;
        &lt;/li&gt;
        &lt;li id="2"&gt;
            &lt;a href="location2.html" title="this is the decription2"&gt;This is the link2&lt;/a&gt;
        &lt;/li&gt;
        &lt;li id="3"&gt;
            &lt;a href="location3.html" title="this is the decription3"&gt;This is the link3&lt;/a&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
&lt;a href="#" class="prev nav"&gt;prev&lt;/a&gt;
&lt;a href="#" class="next nav"&gt;next&lt;/a&gt;
&lt;div id="linkdesciption"&gt;&lt;/div&gt;
&lt;a href="#" id="execute"&gt;Execute link&lt;/a&gt;​
</code></pre>

<p>The JS</p>

<pre><code>// Cycles Menu   
$('#menu &gt; li:first').addClass('active');
$('.next').click(function(){
    $('.active').next().addClass('active').prev().removeClass('active');        
    $('#menu &gt; li:last').after($('#menu &gt; li:first'));
});
$('.prev').click(function(){
    $('.active').prev().addClass('active').next().removeClass('active');
    $('#menu &gt; li:first').before($('#menu &gt; li:last'));
});

// Collects the link  
var executeLink = $('#menu &gt; li.active &gt; a').attr("href");
$('#execute').attr("href", executeLink); 
$('#execute').click(function(){
   alert(executeLink);
});

// Collects title and inject into description
$('.nav').click(function(){
    var description = $('.active &gt; a').attr('title'); 
    $(description).appendTo('#linkdesciption');
}); 
</code></pre>
