How to use 'jquery haschild' in JavaScript

Every line of 'jquery haschild' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
178hasChild (element) {
179 if (this.children.indexOf(element) != -1) {
180 return true;
181 }
182 return false;
183}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

76return function child(elem) {
77 var parent = adapter.getParent(elem);
78 return !!parent && next(parent);
79};

Related snippets