diff --git a/clusterize.js b/clusterize.js index 0682267..1de7429 100644 --- a/clusterize.js +++ b/clusterize.js @@ -195,7 +195,7 @@ }, // get current cluster number getClusterNum: function () { - this.options.scroll_top = this.scroll_elem.scrollTop; + this.options.scroll_top = this.scroll_elem.scrollTop - this.content_elem.offsetTop; return Math.floor(this.options.scroll_top / (this.options.cluster_height - this.options.block_height)) || 0; }, // generate empty row if no data provided @@ -328,4 +328,4 @@ } return Clusterize; -})); \ No newline at end of file +}));