HTML:

<button id="btn"></button>

<div id="test">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
</ul>
</div>

JQUERY:

var div = $('#test');

var ul = $("ul", div);

var li = $("li", ul);

var li_width = 100;

$('#btn').click(function(){
return move(8);
});

function move(to)
{
ul.animate({left: -(to*li_width}, 100, null, function () { li.slice
(to).slice(0,4) });
}

QUESTION:

how come the function 'move' isn't working? it's not moving the first
4 lis to the left for some reason

...i didn't include the css, because there shouldn't be the problem
with this script

anyway, any help would be appreciated (:

Reply via email to