I needed to write a quick bit of code today to track when a user selects any text on a page. The key was to attach a handler to the "mouseup" event and grab the selection data. This was plain 'ole JS and thankfully <a href="http://dean.edwards.name">Dean Edwards</a> and <a href="http://crisp.tweakblogs.net/">Tino Zijdel</a> had created a nice <a href="http://therealcrisp.xs4all.nl/upload/addEvent_dean.html">cross-browser event handler routine</a> which worked great. And David Walsh has a nice post on doing this same type of functionality in MooTools & jQuery so I was able to leverage some of that code, specifically the 