jquery:setting alt reference not working right
<p>The following script counts the number of Li's in a UL, advances via the width of the image (fixed for now) animating the left property of the containing div, looks at the alt tag of the current img being shown, parses that into an unordered list and rewrites the html of a div with the contents of the dynamic UL. It also updates a href location.</p>

<p>This all works save for one thing:</p>

<p>After the initial load, when clicking the "next"/gray arrow for the first time the next list time (image) slides into view but the alt text isn't updated to reflect notes about that item.</p>

<p>If I click a second time, the animation continues as normal and then the alt text finally changes.. except it's the information for the previous image...so I get one behind and eventually the images run out and I get one extra click which shows the last alt tag information.</p>

<p>What I'm looking for is: load page gets, parses and formats the alt tag info for the first list item (all of which are images) and then clicking the next arrow, that image slides out of view, the next one comes up and the name, description and href link of three separate divs get updated.</p>

<p>I just can't where exactly I'm missing it..something in the start variable? (oh... I realize this is only set-up for the "next" /forward moving arrow to work in terms of the parsing/formatting data)</p>

<p>code:</p>

<pre><code>$(document).ready(function(){ 

//Define the animation speed for the Carousel 
var speed = 200; 
var start = 0;

//for the first explantion to get parsed. 
function spliceAndDice(){ 
var theFirst = $("#slider1 img").attr('alt').split('|');
var theFirstAlt = theFirst;

$('.templateExplanation').html('&lt;ul class="altDescription"&gt;' + '&lt;li&gt;' + theFirstAlt[0] + '&lt;/li&gt;' + '&lt;li&gt;' + theFirstAlt[1] + '&lt;/li&gt;' + '&lt;li&gt;' + theFirstAlt[2] + '&lt;/li&gt;' +'&lt;/ul&gt;');
$('.linkedPDF a').attr('href','1.html');     
};

spliceAndDice();

$('#navPrev').click(function(){ 
start == 0 ? start = 0 : move=start+385;
start &lt; 0 ? start = 0 : move=0;
start = move;
$('#carousel ul').animate({marginLeft:move}, speed);

$('.templateExplanation').text($($("#slider1 img")[start/-385]).attr('alt'));
$('.linkedPDF a').attr('href',$($("#slider1 a")[start/-385]).attr('href'));

            }); 

//check for last left position and set it to last left to stop
$('#navNext').click(function(){ 
start == ($("#slider1 li").length-1)*-385 ? move = start : move=start-385;

var theOne = ($($("#slider1 img")[start/-385]).attr('alt').split('|'));
$('#carousel ul').animate({marginLeft:move}, speed);
        start = move;
        var theAlt = theOne;

$('.templateExplanation').html('&lt;ul class="altDescription"&gt;' + '&lt;li&gt;' + theAlt[0] + '&lt;/li&gt;' + '&lt;li&gt;' + theAlt[1] + '&lt;/li&gt;' + '&lt;li&gt;' + theAlt[2] + '&lt;/li&gt;' +'&lt;/ul&gt;');
    $('.linkedPDF a').attr('href',$($("#slider1 a")[start/-385]).attr('href'));     
});     
});
</code></pre>
