+import {slideDown, slideUp} from "../services/animations";
+
/**
* Collapsible
* Provides some simple logic to allow collapsible sections.
open() {
this.elem.classList.add('open');
- $(this.content).slideDown(400);
+ this.trigger.setAttribute('aria-expanded', 'true');
+ slideDown(this.content, 300);
}
close() {
this.elem.classList.remove('open');
- $(this.content).slideUp(400);
+ this.trigger.setAttribute('aria-expanded', 'false');
+ slideUp(this.content, 300);
}
toggle() {