There is a method to do it with CSS, but it is a non-standard feature:
::selection {
background: transparent;
}
::-moz-selection {
background: transparent;
}
Is there a way to do it in JavaScript? More on ::selection
can be found at caniuse.