|
1 |
|
2 $(document).ready(function() { |
|
3 |
|
4 /** |
|
5 * This will copy the innerHTML of an element to the clipboard |
|
6 * @param element reference OR string |
|
7 */ |
|
8 function copyToClipboard(e) { |
|
9 var tempItem = document.createElement('textarea'); |
|
10 |
|
11 document.body.appendChild(tempItem); |
|
12 tempItem.value = e; |
|
13 tempItem.select(); |
|
14 document.execCommand('Copy'); |
|
15 |
|
16 tempItem.parentElement.removeChild(tempItem); |
|
17 } |
|
18 |
|
19 |
|
20 $('#copytoClipboard').jqxButton({ template: 'success', theme: theme, width: 150 }); |
|
21 $('#copytoClipboard').click(function() { |
|
22 copyToClipboard(forumstr); |
|
23 window.close(); |
|
24 }); |
|
25 |
|
26 }); |
|
27 |