Select all text in textarea jquery

How to make all text in textarea selected when user open it through jquery?


$('textarea').on('mouseup', function() { $(this)[0].select(); });‚Äč

var eraInput = document.getElementById('era');;

$('textarea').focus(function() {;


From the line "when user open it through jquery" I think you need something like:
$('textarea').slideDown(function() {
}).focus(function() {;

Here I assume your textarea is hidden and you opened it using jQuery event and after open it text will be selected by default.


Need Your Help

$_POST the javascript Date() time at the time of submit button clicked

php javascript html post

I am currently coding a web page that allows users to change local settings on a singleboard embedded computer. A feature I am currently working on involves syncing the clock on the board with the ...