Update: disableTestSelect

Introduction

Received a kind comment from dehneg the other day, he pointed out the disableTextSelect plugin has no way of enabling the text select after it’s been disabled, pretty large thing for me to neglact. So here is an updated version with enableTextSelect.

Requirements

Compatibility

So far the plugin has been tested in windows using the following browsers.

Usage

HTML

1
2
3
<p class="disableSelection">
    this text can't be selected.
</p>

Javascript

1
2
3
$(function() {
    $('.disableSelection').disableTextSelect(); // and enableTextSelect() to re-enable it again
});

Downloads

jquery.disable.text.select.js
jquery-disable.text.select.example.htm
jquery.disable.text.select.pack.js

Comments

5 Responses to “Update: disableTestSelect”

  1. dehneg on November 28th, 2007 2:17 pm

    Thanks a lot for the update. Five stars for the reactivity.

    Just a remark : your example can not work because the link which import the jQuery library is broken.

    Alex

  2. letssurf on November 28th, 2007 2:47 pm

    sorry about that, should really double test things before publishing. example fixed now

    :¬)

  3. Krijn on January 31st, 2008 2:55 pm

    I have made a example in using your code i realy like it tho but do you have a solution for the not workin sections.

    jQuery Disable Select Text - Example

    $(function($) {
    $(’.disableSelection’).disableTextSelect();
    $(’.enableSelection’).enableTextSelect();
    });


    try selecting me with your mouse
    try selecting me with your mouse

    wuihfghrvuygs ygrgfuysgufgyuf
    try selecting me with your mouse

    try selecting me with your mouse

    try selecting me with your mouse

  4. Krijn on January 31st, 2008 2:56 pm

    I have made a example in using your code i realy like it tho but do you have a solution for the not workin sections.

    Sorry now with the code

    jQuery Disable Select Text - Example

    $(function($) {
    $(’.disableSelection’).disableTextSelect();
    $(’.enableSelection’).enableTextSelect();
    });


    try selecting me with your mouse
    try selecting me with your mouse

    wuihfghrvuygs ygrgfuysgufgyuf
    try selecting me with your mouse

    try selecting me with your mouse

    try selecting me with your mouse

  5. Krijn on January 31st, 2008 2:57 pm

    sorry for the foul reply’s if you send me a mail i will show what i mean.

    Thnx Krijn

Leave a Reply