select

Build Status

Programmatically select the text of a HTML element.

Install

You can get it on npm.

  1. npm install select --save

Or bower, too.

  1. bower install select --save

If you’re not into package management, just download a ZIP file.

Usage

Standalone

  1. <script src="dist/select.js"></script>
  1. var input = document.querySelector('input');
  2. var result = select(input);

Browserify

  1. var select = require('select');
  1. var input = document.querySelector('input');
  2. var result = select(input);

License

MIT License © Zeno Rocha