| Line 455... |
Line 455... |
| 455 |
|
455 |
|
| 456 |
// Add a clipThis handler to each element with a clipThis class
|
456 |
// Add a clipThis handler to each element with a clipThis class
|
| 457 |
// Will copy the text of the element to the clipboard
|
457 |
// Will copy the text of the element to the clipboard
|
| 458 |
// Add dynamically so that it will be invoked on dynamically created elements
|
458 |
// Add dynamically so that it will be invoked on dynamically created elements
|
| 459 |
$( document ).on('click', '.clipThis', function(event){
|
459 |
$( document ).on('click', '.clipThis', function(event){
|
| 460 |
var txt = $(this).eq(0).text();
|
460 |
var txt = $(this).eq(0).text().trim();
|
| 461 |
vixTextToClipBoard(txt, {note : "Copied to Clipboard", duration : 1000});
|
461 |
vixTextToClipBoard(txt, {note : "Copied to Clipboard", duration : 1000});
|
| 462 |
});
|
462 |
});
|
| 463 |
|
463 |
|
| 464 |
// Copy data from element to clipboard
|
464 |
// Copy data from element to clipboard
|
| 465 |
// Elements have a class of clipData and an attribute of data-clip=xxx
|
465 |
// Elements have a class of clipData and an attribute of data-clip=xxx
|