Cache document query

This commit is contained in:
Filipa Lacerda 2018-01-02 21:06:56 +00:00
parent 6db6856d8d
commit a276391b18
No known key found for this signature in database
GPG Key ID: 9CA3FDE4D1E2F1C8
1 changed files with 3 additions and 2 deletions

View File

@ -100,8 +100,9 @@ export default class Job {
}
toggleScroll() {
const currentPosition = $(document).scrollTop();
const scrollHeight = $(document).height();
const $document = $(document);
const currentPosition = $document.scrollTop();
const scrollHeight = $document.height();
const windowHeight = $(window).height();
if (this.canScroll()) {