Cache document query
This commit is contained in:
parent
6db6856d8d
commit
a276391b18
1 changed files with 3 additions and 2 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue