File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ InfiniteScrollButton.prototype.hide = function() {
7676} ;
7777
7878InfiniteScrollButton . prototype . destroy = function ( ) {
79- this . element . removeEventListener ( this . clickHandler ) ;
79+ this . element . removeEventListener ( 'click' , this . clickHandler ) ;
8080} ;
8181
8282// -------------------------- -------------------------- //
Original file line number Diff line number Diff line change @@ -77,22 +77,17 @@ <h1 class="post-header__title">Mealio logo</h1>
7777< script src ="../js/scroll-watch.js "> </ script >
7878< script src ="../js/page-load.js "> </ script >
7979< script src ="../js/history.js "> </ script >
80+ < script src ="../js/button.js "> </ script >
8081< script >
8182var container = document . querySelector ( '.posts-container' ) ;
8283var infScroll = new InfiniteScroll ( container , {
8384 path : '.pagination__next' ,
8485 append : '.post' ,
85- historyTitle : true ,
86+ button : '.load-more-button' ,
8687 loadOnScroll : false ,
8788 history : false ,
8889} ) ;
8990
90- var loadMoreButton = document . querySelector ( '.load-more-button' ) ;
91-
92- loadMoreButton . onclick = function ( ) {
93- infScroll . loadNextPage ( ) ;
94- } ;
95-
9691</ script >
9792
9893</ body >
You canβt perform that action at this time.
0 commit comments