问题描述
这个是鼠标滚轮拉动垂直滚动的代码问题是当垂直滚动的时候内容到顶部或底部就停止不继续滚动页面,现在想滚动页面,这个是main.js里的代码要修改哪一段就可以了?jQuery(function($){//-----------------------------------------------------------------------------------//Examples//-----------------------------------------------------------------------------------//Functionforpopulatinglistswithplaceholderitemsfunctionpopulate(container,count,offset){varoutput='';offset=isNaN(offset)?0:offset;for(vari=0;i<count;i++){output+='<li>'+(offset+i)+'</li>';}return$(output).appendTo(container);}//Populatelistitems$('ul[data-items]').each(function(i,e){varitems=parseInt($(e).data('items'),10);populate(e,items);});//Activatesection(itmisbehaveswhenslyiscalledonhiddensections)$(document).on('activated',function(event,sectionId){var$section=$('#'+sectionId);if($section.data('examplesLoaded')){return;}switch(sectionId){case'infinite':var$frame=$section.find('.frame'),$ul=$frame.find('ul').eq(0),$scrollbar=$section.find('.scrollbar'),$buttons=$section.find('.controlbar[data-action]');populate($ul,10);$frame.on('sly:move',function(e,pos){if(pos.cur>pos.max-100){populate($ul,10,$ul.children().length-1);$frame.sly('reload');}}).sly({itemNav:'basic',scrollBy:1,scrollBar:$scrollbar});//Controls$buttons.on('click',function(e){varaction=$(this).data('action');switch(action){case'reset':$frame.sly('toStart');setTimeout(function(){$ul.find('li').slice(10).remove();$frame.sly('reload');},200);break;default:$frame.sly(action);}});break;default://Callslyinstances$section.find(".slyWrap").each(function(i,e){//if(i!=3)return;varcont=$(this),frame=cont.find(".sly"),slidee=frame.find("ul"),scrollbar=cont.find(".scrollbar"),pagesbar=cont.find(".pages"),options=frame.data("options"),controls=cont.find(".controls"),prevButton=controls.find(".prev"),nextButton=controls.find(".next"),prevPageButton=controls.find(".prevPage"),nextPageButton=controls.find(".nextPage");options=$.extend({},options,{scrollBar:scrollbar,pagesBar:pagesbar,prev:prevButton,next:nextButton,prevPage:prevPageButton,nextPage:nextPageButton,disabledClass:'btn-disabled'});//Callslyframe.sly(options);//Bindcontrolscont.find("button").click(function(){varaction=$(this).data('action'),arg=$(this).data('arg');switch(action){case'add':slidee.append(slidee.children().slice(-1).clone().removeClass().text(function(i,text){returntext/1+1;}));frame.sly('reload');break;case'remove':slidee.find("li").slice(-1).remove();frame.sly('reload');break;default:frame.sly(action,arg);}});});}$section.data('examplesLoaded',true);});//-----------------------------------------------------------------------------------//Pagenavigation//-----------------------------------------------------------------------------------//Navigationvar$nav=$('#nav'),$sections=$('#sections').children(),activeClass='active';//Tabs$nav.on('click','a',function(e){e.preventDefault();activate($(this).attr('href').substr(1));});//Backtotopbutton$('a[href="#top"]').on('click',function(e){e.preventDefault();$(document).scrollTop(0);});//Activateasectionfunctionactivate(sectionID,initial){sectionID=sectionID&&$sections.filter('#'+sectionID).length?sectionID:$sections.eq(0).attr('id');$nav.find('a').removeClass(activeClass).filter('[href=#'+sectionID+']').addClass(activeClass);$sections.hide().filter('#'+sectionID).show();if(!initial){window.location.hash='!'+sectionID;}$(document).trigger('activated',[sectionID]);}//Activateinitialsectionactivate(window.location.hash.match(/^#!/)?window.location.hash.substr(2):0,1);//-----------------------------------------------------------------------------------//Additionalplugins//-----------------------------------------------------------------------------------//TriggerprettyPrintprettyPrint();});