Check whether a DOM element is contained by another one
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.npmignore
.testem.json
.travis.yml
LICENCE
README.md
index.js
package.json

README.md

contains

dependency status

browser support

Check whether a DOM element is contained by another one

Example

var contains = require("contains")

var container = document.getElementById("container")
var someElem = document.getElementById("someElem")

// does container contain someElem as a child?
var contained = contains(container, someElem)

Installation

npm install contains

Contributors

  • Raynos

MIT Licenced