Przeczytalem ksiazke o jQuery, no i chcialem sprawdzic swoje umiejetnosci w jQuery tworzac prosty rotator obrazow, i napotkalem juz problem

A wiec:
Mam takie kodziki:
<html> <head> <link rel="stylesheet" href="style.css" type="text/css" /> </head> <body> <div id="slider"> <ul> </ul> </div> <script> $(document).ready(function(){ var html = "<ol class=\"controls\">"; $('#slider img').each(function(i){ }); html += "</ol>"; $('#controls').html(html); var slides = $('#slider img').length; var width = $('#slider').width(); $('#slider ul').css("width", slides*width); $('#slider img').each(function(i) { $('#slider ul').css("left", i*width).delay(800); }); }); </script> </body> </html>
i css
#slider{ width:696px; height:241px; overflow:hidden; position:relative; } #slider ul{ list-style:none; position:absolute; left:0; } #slider li{ float:left; left:10; } #slider img{ float:left; } #controls ol{ list-style:none; } #controls li{ float:left; width:25px; height:22px; background:#f2f2f2; border:1px #d9d9d9 solid; text-align:center; margin-left:5px; padding-top:3px; }
Lista z kontrolkami wyswietla sie ladnie od 1 do 5, problem w tym ze po dodaniu position:absolute do #slider ul nie wyswietlaja sie obrazki, i mam problem z przesuwaniem ich. bez position:absolute; wyswietla sie tylko obrazek 1 i nic wiecej.
Czy ktos moze mi pomoc z animowaniem takiego slidera?
refresh