Script to move text away from mouse? November 24, 2006 2:35 PM Subscribe
I need some Javascript code to cut and paste which will move some text away from the mouse! Can anyone help? posted by BobsterLobster to computers & internet (3 comments total)
In it, I explicitly use range.cloneContents() so that the selected text does not disappear and a copy appears elsewhere. If I hadn't used cloneContents() the text would have moved. posted by MonkeySaltedNuts at 3:07 PM on November 24, 2006
Also you didn't say why you wanted such code. For inclusion in a web page? For a userscript? Do you want to move just plain text? or the underlying HTML?
It may be that my example uses Mozilla specific features that won't work in IE. It has been a while since I wrote it and I vaguely remember some differences.
But since it is a Greasemonkey script, I only have to worry about it working in Firefox. posted by MonkeySaltedNuts at 4:01 PM on November 24, 2006
I wanted it on a webpage, so that a layer would move away from any visitor's mouse. Ah well. posted by BobsterLobster at 11:00 AM on November 26, 2006
« Older
How do I tell itunes to just d...
| Cricket. Ashes. Where?...
Newer »
In it, I explicitly use
range.cloneContents()so that the selected text does not disappear and a copy appears elsewhere. If I hadn't usedcloneContents()the text would have moved.posted by MonkeySaltedNuts at 3:07 PM on November 24, 2006