defineJQueryPlugin,
getElement,
getElementFromSelector,
+ getNextActiveElement,
isDisabled,
isElement,
- isVisible,
isRTL,
+ isVisible,
noop,
- getNextActiveElement,
typeCheckConfig
} from './util/index'
import EventHandler from './dom/event-handler'
return
}
- const isActive = this._element.classList.contains(CLASS_NAME_SHOW)
+ const isActive = this._isShown()
if (isActive) {
this.hide()
}
show() {
- if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW)) {
+ if (isDisabled(this._element) || this._isShown(this._menu)) {
return
}
}
hide() {
- if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {
+ if (isDisabled(this._element) || !this._isShown(this._menu)) {
return
}
return config
}
+ _isShown(element = this._element) {
+ return element.classList.contains(CLASS_NAME_SHOW)
+ }
+
_getMenuElement() {
return SelectorEngine.next(this._element, SELECTOR_MENU)[0]
}
continue
}
- if (!context._element.classList.contains(CLASS_NAME_SHOW)) {
+ if (!context._isShown()) {
continue
}