// JavaScript Document var leftCt = 0; $(function(){ $("#album").attr("top", "0"); imgStart("R"); }); function imgStart(tp){ clearInterval($("#imgList").attr("timer")); if(tp == "R"){ // ¿À¸¥ÂÊ À̵¿ imgRight(); $("#imgList").attr("timer", setInterval("imgRight()", 4000)); // ¸ØÃçÀÖ´Â ½Ã°£ }else{ // ¿ÞÂÊÀ̵¿ if(leftCt == 0){ var leng = $("#imgList div").size(); $("#imgList").css("left",parseInt($("#imgList div").eq(0).width()*-1)); $("#imgList>div").eq(parseInt(leng-1)).clone().prependTo($("#imgList")); $("#imgList>div").eq(leng).remove(); leftCt = 1; } imgLeft(); $("#imgList").attr("timer", setInterval("imgLeft()", 3000)); } } function imgRight(){ $("#imgList").animate({ left : parseInt($("#imgList div").eq(0).width() * -1) },300,function(){ $("#imgList").css("left", "0px"); $("#imgList>div").eq(0).clone().appendTo($("#imgList")); $("#imgList>div").eq(0).remove(); }); } function imgLeft(){ var leng = $("#imgList div").size(); $("#imgList").animate({ left : 0 },300,function(){ $("#imgList").css("left", "0px"); $("#imgList").css("left",parseInt($("#imgList div").eq(0).width()*-1)); $("#imgList>div").eq(parseInt(leng-1)).clone().prependTo($("#imgList")); $("#imgList>div").eq(leng).remove(); }); }