cross-browser function to return the selection position
JavaScript
Switch branches/tags
Nothing to show
Clone or download
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
component.json
example.html
index.js
package.json

Readme.md

selection-position

Determine the current position of the selection or cursor.

Installation

Install with component(1):

$ component install bmcmahen/selection-position

Example

var position = require('selection-position');
var rect = position();
// rect.top, rect.height, etc.

Tests

npm install component-test -g
component test browser

License

MIT