MCPcopy Index your code
hub / github.com/layerJS/layerJS / clearMenus

Function clearMenus

test/e2e/bootstrap/bootstrap/js/bootstrap.js:787–806  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

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

Callers 1

bootstrap.jsFile · 0.85

Calls 1

getParentFunction · 0.85

Tested by

no test coverage detected