Jquery last selector solution
<p>I have created this <a href="http://jsfiddle.net/9dF22/" rel="nofollow">Fiddle</a> with this code:</p>

<p>This is my problem I want to make same behavior by selecting <b>last</b> li (fifth) tag  but <b>not</b> the <b>fourth</b> like in this example ,but I don't know how to accomplish that:(  </p>

<p>I hope that someone can help me with this...THX!!</p>

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

 $("button").click(function() {
    $('.active').removeClass('active').next('li').addClass('active')
      if ($('ul li:last').hasClass('active')) {
          $('ul li:last').removeClass('active')
          $('ul li:first').addClass('active')
      }

  });


});
</code></pre>
