auto select copy pick text - Free Download Auto Select And Copy Content In Text Field - jQuery Pick-text

Free Download Auto Select And Copy Content In Text Field – jQuery Pick-text

Posted on

This time I will share jQuery Plugin and tutorial about Auto Select And Copy Content In Text Field – jQuery Pick-text, hope it will help you in programming stack.

auto select copy pick text - Free Download Auto Select And Copy Content In Text Field - jQuery Pick-text
File Size: 9.98 KB
Views Total: 350
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Pick-text is a tiny jQuery plugin that automatically selects and copies content in an input field when clicked.

See Also:

How to use it:

1. Install & download the plugin via NPM.

1 # NPM
2 $ npm install @kanety/jquery-pick-text --save

2. Load the jQuery Pick-text plugin from the dist folder.

1 <script src="/path/to/cdn/jquery.slim.min.js"></script>
2 <script src="/path/to/dist/jquery-pick-text.js"></script>

3. Attach the plugin to the input field and done.

1 <input type="text" class="demo" value="Text To Select & Copy" />
1 $('.demo').on('click', function(e) {
2   $(e.currentTarget).pickText();
3 });

4. Disable the Auto Copy while preserving the Auto Select functionality.

1 <input type="text" class="demo" value="Text To Select & Copy" />
1 $('.demo').on('click', function(e) {
2   $(e.currentTarget).pickText({
3     copy: false
4   });
5 });

This awesome jQuery plugin is developed by kanety. For more Advanced Usages, please check the demo page or visit the official website.

source : jquery.net