// Motion UI method of hiding
if (this.options.animationOut) {
- Foundation.Motion.animateOut(this.$element, this.options.animationOut, () => {
- if (this.options.overlay) {
- Foundation.Motion.animateOut(this.$overlay, 'fade-out', finishUp);
- }
- else {
- finishUp();
- }
- });
+ if (this.options.overlay) {
+ Foundation.Motion.animateOut(this.$overlay, 'fade-out');
+ }
+
+ Foundation.Motion.animateOut(this.$element, this.options.animationOut, finishUp);
}
// jQuery method of hiding
else {