1

How to re-enable the text-selection on IE, Opera & Webkit?

I disabled it like that:

$(this).mousedown(function(){return true;}); //Opera, webkit
$(this).bind('selectstart',function(){return true;}); //IE

(with firefox, I can easily re-enable it with $(this).css('MozUserSelect','text');

Chuck
  • 406
  • 6
  • 15

2 Answers2

2

I think the best thing to do would be to unbind the event listeners.

Patrick M
  • 10,547
  • 9
  • 68
  • 101
1

Do not use bind() and unbind() methods. Use on() and off() instead — preferred as of jQuery 1.7 and above.

mbinette
  • 5,094
  • 3
  • 24
  • 32
reff
  • 11
  • 1