MCPcopy Create free account
hub / github.com/apache/cloudstack / getParent

Function getParent

tools/ngui/static/bootstrap/js/bootstrap.js:425–439  ·  view source on GitHub ↗
($this)

Source from the content-addressed store, hash-verified

423 }
424
425 function getParent($this) {
426 var selector = $this.attr('data-target')
427 , $parent
428
429 if (!selector) {
430 selector = $this.attr('href')
431 selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
432 }
433
434 $parent = selector && $(selector)
435
436 if (!$parent || !$parent.length) $parent = $this.parent()
437
438 return $parent
439 }
440
441
442 /* DROPDOWN PLUGIN DEFINITION

Callers 2

bootstrap.jsFile · 0.85
clearMenusFunction · 0.85

Calls 4

$Function · 0.85
replaceMethod · 0.80
parentMethod · 0.80
testMethod · 0.45

Tested by

no test coverage detected