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.
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.
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(); |
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({ |
This awesome jQuery plugin is developed by kanety. For more Advanced Usages, please check the demo page or visit the official website.