Highlights
- Pro
Pinned Loading
-
-
-
react-router
react-router PublicForked from remix-run/react-router
Declarative routing for React
JavaScript
-
Climb DOM for element with class
Climb DOM for element with class 1function hasClass(el, cls) {
2if (el && cls) {
3if (el.classList.contains(cls)) return true;
4return false;
5} else return 'error';
-
Returns boolean if element has class
Returns boolean if element has class 1function hasClass(el, cls) {
2if (el && cls) {
3if (el.classList.contains(cls)) return true;
4return false;
5} else return 'error';
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.