Enabling custom text selection style in HTML page
<p>I was browsing through the official website of John Resig at <a href="http://ejohn.org/blog/javascript-pretty-date/" rel="nofollow">John Resig</a> when I noticed that if I try to select any text in the page by pressing down the mouse button and dragging across he target text, instead of a blue background appearing across the text selected so far (alongwith setting the color of the selected text to white), the selected text is rendered blue progressively, without any change in the background color. How can I achieve this? I think it might be possible to use some complicated combination of <code>selectStart</code> and <code>setSelection</code> functions, but their support is pretty limited.</p>
