I have the following code:
<script> $(document).ready( function() { var middleIndex = 3; var maxIndex = $("ul li").length - 1; var minIndex = 0; $('ul#reel li').mouseover(function() { var index = $(this).parent().children().index(this); var tempIndex; var showIndex; var visibleRows = $("ul li:visible").length; if(index > middleIndex && visibleRows == 7) { tempIndex = middleIndex - 3; showIndex = middleIndex + 4; if(tempIndex <= maxIndex && showIndex <= maxIndex) { $("ul li:eq("+tempIndex+")").hide(500); $("ul li:eq("+showIndex+")").show(500); middleIndex++; } } else if(index < middleIndex) { tempIndex = middleIndex + 3; showIndex = middleIndex - 4; if(tempIndex <= maxIndex && showIndex >= minIndex) { $("ul li:eq("+tempIndex+")").hide("slow"); $("ul li:eq("+showIndex+")").show("slow"); middleIndex--; } } }); }); </script> I want the animation on the right side to be as smooth as the animation on the left side. How can this be done? I think the reason It's slowing down on the right side is because it loops through all the LIs in order to find the max index but i'm not sure.