MCPcopy
hub / github.com/layerJS/layerJS / getParent

Function getParent

test/e2e/bootstrap/bootstrap/js/bootstrap.js:774–785  ·  view source on GitHub ↗
($this)

Source from the content-addressed store, hash-verified

772 Dropdown.VERSION = '3.3.7'
773
774 function getParent($this) {
775 var selector = $this.attr('data-target')
776
777 if (!selector) {
778 selector = $this.attr('href')
779 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
780 }
781
782 var $parent = selector && $(selector)
783
784 return $parent && $parent.length ? $parent : $this.parent()
785 }
786
787 function clearMenus(e) {
788 if (e && e.which === 3) return

Callers 2

clearMenusFunction · 0.85
bootstrap.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected