jquery-getpath
Version:
Get the unique CSS path of an element.
19 lines (14 loc) • 328 B
Markdown
# jquery-path
Gets the CSS path to a jQuery node or the element representation of a library
with a similar API.
Based on a StackOverflow answer.
## Install
```
npm install jquery-path
```
## Usage
```javascript
getPath($('.foo')) // => 'html>body>div#bar>div.foo'
```
## License
This code is licensed under the MIT license.