我试图通过一个divs列表将功能置于周期下, 目前我只设置它来申请一个 div (#2) 和最近的 div 。 我理解它需要递增 (i), 第一个 div (#1) 将拥有 i=0 。
是的,我就是那个新来的家伙 建造我自己的裸骨滑板。
function movedown() {
$("#two").next().animate({height: 80% }, 500);
$("#two").animate({height: 20px },500);
;}
function moveup() {
$("#two").prev().animate({height: 80% }, 500);
$("#two").animate({height: 20px },500);
;}
$(function () {
$( #up ).click(moveup);
$( #down ).click(movedown);
});