How does JS or JQ deselect text?

when a paragraph of text is selected with the mouse, the background of the text turns blue.
how to deselect it with JS or JQ?

Note: not to disable the selected text at first, but to uncheck the selected one.

Jun.04,2021

window.getSelection().empty()

you can do this with css,
p::selection {background: transparent}

Menu