[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]example/2015-09-02 21:54 -  
[TXT]README.md2015-09-02 22:08 547 0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]index.js2016-07-26 20:42 780  
[   ]package.json2023-06-08 14:14 1.7K 
# Toggle Selection

Simple module exposing function that deselects current browser selection and returns function that restores selection.

```
var deselect = require('toggle-selection');
var reselect = deselect(); // remove all selection
// … 
// do something with current selection, text, etc;
// …
reselect(); // restore selection
```

All credits go to [@shvaikalesh](https://github.com/shvaikalesh).

# [Example](https://github.com/sudodoki/toggle-selection/blob/master/example)

![example recording](http://g.recordit.co/YPu6mHvcKe.gif)