Not having much luck with this. I'm trying to determine if a var is not empty.
$('#content').mouseup(function() {
var selection = getSelected();
if (typeof(selection) !=='undefined') {
alert(selection);
}
});
What this is doing is grabbing any text the user has selected -- but it shows an empty alert even if the user just mouseup's on the div.