www/js/rec_forum.js

changeset 804
ac5c3e97fcf1
parent 803
45e87aa8d02c
child 805
488613f30789
equal deleted inserted replaced
803:45e87aa8d02c 804:ac5c3e97fcf1
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

mercurial