Slider in jQuery
<p>I am trying to make a image slider, the following is my code:</p>

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

<pre><code>&lt;div class="slider_mian_cont"&gt;
  &lt;div class="slider_inner"&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;img src="images/one.jpg" width="940" height="350" alt=" " /&gt;&lt;/li&gt;
            &lt;li&gt;&lt;img src="images/two.jpg" width="940" height="350" alt=" " /&gt;&lt;/li&gt;
            &lt;li&gt;&lt;img src="images/three.jpg" width="940" height="350" alt=" " /&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div id="next"&gt;&lt;a href="#"&gt;next&lt;/a&gt;&lt;/div&gt;
</code></pre>

<p><strong>jQuery</strong></p>

<pre><code>$(document).ready(function(e) {
    var len = $('.slider_mian_cont ul li').length;
    var wd = $('.slider_mian_cont ul').width();
    var mn = $('.slider_inner').width(wd*len);
    var testa = $('.slider_mian_cont ul li').width(); 
    $('#next').click(function(){  
        var leftValue = $('.slider_inner').position().left;
        //console.log('leftValue : ' + leftValue + ',  testa : ' + testa);
        var movedValue = leftValue - testa;
        //console.log('movedValue : ' + movedValue);
        $('.slider_inner').animate({ left: movedValue }, 200 )
        })
});
</code></pre>

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

<pre><code>.slider_mian_cont{width:940px; height:350px; overflow:hidden; position:relative;}
.slider_inner{position:absolute;}
.slider_mian_cont ul{margin:0; padding:0; }
.slider_mian_cont ul li{margin:0; padding:0; float:left; width:940px; height:350px; list-style:none;}
</code></pre>

<p>I just want to set condition that if last <code>&lt;li&gt;</code> come tan the 'next' button stop working.</p>
