think this should be an easy one… I want to get the currently selected text using jquery’s select() function.
$('textarea').select(function(selection) {
alert(selection);
});
This returns [object Object]… how do I return the selected text?
Many thanks
From jquery’s select() doc:
a quick google search for “jquery get selected text” turned up this:
http://motyar.blogspot.com/2010/02/get-user-selected-text-with-jquery-and.html
this:
http://mark.koli.ch/2009/09/use-javascript-and-jquery-to-get-user-selected-text.html
and many more