Hello, I am kind of stuck on this one. I have webapp where I use simple JQuery plugin:
$.extend($.fn.disableTextSelect = function() {
return this.each(function(){
if($.browser.mozilla){//Firefox
$(this).css('MozUserSelect','none');
}else if($.browser.msie){//IE
$(this).bind('selectstart',function(){return false;});
}else if ($.browser.webkit) { // chrome, webkit
$(this).css('webkitUserSelect','none');
this.onselectstart = function () { return false; };
}else{//Opera, etc.
$(this).mousedown(function(){return false;});
}
});
});
This plugin generally disables mouse text selects on all the browsers. I call it on #desktop element, which is basically main wrapper:
$('#desktop').disableTextSelect();
I use this, because it disables mouse text selects on all the elements inside #desktop. However, there are some of elements in #desktop, which I want to have normal text select behaviour. Is there some easy way how to implement code, that would make exception to the global rule ?