urrId = 0 } if (--currPage < 0) { currPage = 0; return false } } ; var d = (a ? '-=' : '+=') + h; $(this).stop(true, true).animate(f ? {top: d} : {left: d}, 500, function () { $.proxy(i, $('li', $list).eq(currId))() }) }); $('div.button', this).click(function () { $list.trigger($(this).is('.moveforward') ? 'moveforward' : 'movebackward') }) }) } })(jQuery); $(function(){ //纵向,默认,移动间隔2 $('div.albumSlider').albumSlider(); //横向设置 $('div.albumSlider-h').albumSlider({direction:'h',step:3}); });