I am trying to disable text selection, and it works fine in all browsers but IE. I have added a bit of code to the css as well as to the index. It still is not disabling.
I have added this to the index:
$('#poet').disableSelection(); // deprecated in jQuery UI 1.9
$(el).attr('unselectable','on')
.css({'-moz-user-select':'-moz-none',
'-moz-user-select':'none',
'-o-user-select':'none',
'-khtml-user-select':'none', /* you could also put this in a class */
'-webkit-user-select':'none',/* and add the CSS class here instead */
'-ms-user-select':'none',
'user-select':'none'
}).bind('selectstart', function(){ return false; });
$("#123").bind( "selectstart", function(e){
e.preventDefault();
return false;
});
$("#123").bind("selectstart", function (evt) {
evt.preventDefault();
});
And this to the .css file:
* {
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select:none;
}
Any help would be greatly appreciated. Thank you.