find the closest parent element (given a selector) of the cursor
JavaScript HTML Makefile
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
History.md
Makefile
Readme.md
example.html
index.js
package.json

Readme.md

cursor-within

determine if the cursor is within a selector-matched element

Installation

Install with component(1) or NPM:

$ component install bmcmahen/cursor-within
$ npm install cursor-within

Use

var within = require('cursor-within');
var el = within('span.highlighted');

License

MIT