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() {
76
76
} ;
77
77
78
78
InfiniteScrollButton . prototype . destroy = function ( ) {
79
- this . element . removeEventListener ( this . clickHandler ) ;
79
+ this . element . removeEventListener ( 'click' , this . clickHandler ) ;
80
80
} ;
81
81
82
82
// -------------------------- -------------------------- //
Original file line number Diff line number Diff line change @@ -77,22 +77,17 @@ <h1 class="post-header__title">Mealio logo</h1>
77
77
< script src ="../js/scroll-watch.js "> </ script >
78
78
< script src ="../js/page-load.js "> </ script >
79
79
< script src ="../js/history.js "> </ script >
80
+ < script src ="../js/button.js "> </ script >
80
81
< script >
81
82
var container = document . querySelector ( '.posts-container' ) ;
82
83
var infScroll = new InfiniteScroll ( container , {
83
84
path : '.pagination__next' ,
84
85
append : '.post' ,
85
- historyTitle : true ,
86
+ button : '.load-more-button' ,
86
87
loadOnScroll : false ,
87
88
history : false ,
88
89
} ) ;
89
90
90
- var loadMoreButton = document . querySelector ( '.load-more-button' ) ;
91
-
92
- loadMoreButton . onclick = function ( ) {
93
- infScroll . loadNextPage ( ) ;
94
- } ;
95
-
96
91
</ script >
97
92
98
93
</ body >
You canβt perform that action at this time.
0 commit comments