MCPcopy
hub / github.com/MrNothing/AI-Blocks / clearMenus

Function clearMenus

docs/assets/plugins/bootstrap/js/bootstrap.js:781–800  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

779 }
780
781 function clearMenus(e) {
782 if (e && e.which === 3) return
783 $(backdrop).remove()
784 $(toggle).each(function () {
785 var $this = $(this)
786 var $parent = getParent($this)
787 var relatedTarget = { relatedTarget: this }
788
789 if (!$parent.hasClass('open')) return
790
791 if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
792
793 $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
794
795 if (e.isDefaultPrevented()) return
796
797 $this.attr('aria-expanded', 'false')
798 $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
799 })
800 }
801
802 Dropdown.prototype.toggle = function (e) {
803 var $this = $(this)

Callers 1

bootstrap.jsFile · 0.85

Calls 1

getParentFunction · 0.85

Tested by

no test coverage detected