Enabling custom text selection style in HTML page
===

I was browsing through the official website of John Resig at [John Resig][1] 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 `selectStart` and `setSelection` functions, but their support is pretty limited.


  [1]: http://ejohn.org/blog/javascript-pretty-date/