From 45b89fac9e38471a82ac9fbdc26f8b41df38f56e Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Sun, 7 Oct 2018 22:38:17 +0200 Subject: [PATCH] docs: use event namespace instead of Class name for event doc #11523 Document events with the namespace of the triggered event instead of the class name. There is not ideal but this is better than having a documentation that doesn't match the described event. This fix is compatible with Foundation <= v6.5.0 Closes https://github.com/zurb/foundation-sites/issues/11523 --- js/foundation.dropdownMenu.js | 2 +- js/foundation.offcanvas.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/foundation.dropdownMenu.js b/js/foundation.dropdownMenu.js index 2b1d6b776..9381f2698 100644 --- a/js/foundation.dropdownMenu.js +++ b/js/foundation.dropdownMenu.js @@ -286,7 +286,7 @@ class DropdownMenu extends Plugin { * @param {jQuery} $sub - ul element that is a submenu to show * @function * @private - * @fires DropdownMenu#show + * @fires Dropdownmenu#show */ _show($sub) { var idx = this.$tabs.index(this.$tabs.filter(function(i, el) { diff --git a/js/foundation.offcanvas.js b/js/foundation.offcanvas.js index a6b65045c..c2daa6bac 100644 --- a/js/foundation.offcanvas.js +++ b/js/foundation.offcanvas.js @@ -281,7 +281,7 @@ class OffCanvas extends Plugin { * @function * @param {Object} event - Event object passed from listener. * @param {jQuery} trigger - element that triggered the off-canvas to open. - * @fires OffCanvas#opened + * @fires Offcanvas#opened * @todo also trigger 'open' event? */ open(event, trigger) { @@ -349,7 +349,7 @@ class OffCanvas extends Plugin { /** * Fires when the off-canvas menu opens. - * @event OffCanvas#opened + * @event Offcanvas#opened */ this.$element.trigger('opened.zf.offcanvas'); } @@ -358,7 +358,7 @@ class OffCanvas extends Plugin { * Closes the off-canvas menu. * @function * @param {Function} cb - optional cb to fire after closure. - * @fires OffCanvas#closed + * @fires Offcanvas#closed */ close(cb) { if (!this.$element.hasClass('is-open') || this.isRevealed) { return; } @@ -370,7 +370,7 @@ class OffCanvas extends Plugin { this.$element.attr('aria-hidden', 'true') /** * Fires when the off-canvas menu opens. - * @event OffCanvas#closed + * @event Offcanvas#closed */ .trigger('closed.zf.offcanvas'); -- 2.47.2