+4  A: 

I think you'd have to do something like this.

$('div.selectableText').mouseUp(function(e){
     if (window.getSelection()){
      var xCoord = e.pageX;
      var yCoord = e.pageY;

      //Use the coordinates (or maybe offset) 
              to position your little modal popup
     }

)};
idrumgood
note: in IE you need to use `document.selection.createRange().text`
Bruce Aldridge