部分代码如下:$(document).ready(function(){/*ThiscodeisexecutedaftertheDOMhasbeencompletelyloaded*/vartotWidth=0;varpositions=newArray();$('#slides.slide').each(function(i){/*TraversethroughalltheslidesandstoretheiraccumulativewidthsintotWidth*/positions[i]=totWidth;totW