Bandit's Javascript Disable Text Selection

Back in 2005 I wrote a popular Javascript snippet that disabled text selection on a page - today I've rewritten it for modern browsers so that it doesn't disable both selection of text AND buttons/links (haha).

The Script

Anyway, feel free to check it out here:

http://lab.bandit.co.nz/scripts/disableselect/bandit-disable-select.js

Usage

Simply copy the following into the <head> tags of your page:

<script type="text/javascript" language="javascript" src="http://lab.bandit.co.nz/scripts/disableselect/bandit-disable-select.js"></script>

Example

Try to select any text in the box below to see it in action...

Enjoy

You may link directly to my files but I don't recommend it. Upload them to your own server and go from there. Cheers!

-- James Nisbet from Bandit Design