188
rated 0 times
[
195]
[
7]
/ answers: 1 / hits: 49275
/ 13 Years ago, fri, april 1, 2011, 12:00:00
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.
More From » javascript