CSS:
/*Disable browser selection*/
.disableselect
{
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-ms-user-select:none;
-webkit-touch-callout:none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.enableselect {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select:text;
user-select:all;
}
JS:
var clearSlct= "getSelection" in window ? function(){
window.getSelection().removeAllRanges();
} : function(){
document.selection.empty();
};