Skip to content

foiseworth/acquire-anchor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Acquire anchor

npm version Build Status Coverage Status MIT Licensed

A function that given a node will return the nearest anchor node starting at the passed node and walking up the tree until there are no more parent nodes.

To use

var acquireAnchor = require('acquire-anchor');
var childNode = document.querySelector('.child-node');

var anchorNode = acquireAnchor(childNode);

About

Given a DOM node, find the nearest anchor node.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published