1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Added custom slideUp/slideDown animations using plain JS

This commit is contained in:
Dan Brown
2019-06-07 15:51:01 +01:00
parent ff841cff2e
commit 2b929f5d95
2 changed files with 95 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
import {slideDown, slideUp} from "../services/animations";
/**
* Collapsible
* Provides some simple logic to allow collapsible sections.
@@ -16,12 +18,12 @@ class Collapsible {
open() {
this.elem.classList.add('open');
$(this.content).slideDown(400);
slideDown(this.content, 300);
}
close() {
this.elem.classList.remove('open');
$(this.content).slideUp(400);
slideUp(this.content, 300);
}
toggle() {