views:

56

answers:

1

Hello everyone, I have a page that has a textarea, when the page is loaded, I want to pre-select the textarea(like twitter.com does), so the user does not have to click on it. Do you know how to do that?

Previously thanks!

Rodrigo Alves Vieira.

+1  A: 
$(document).ready(function() {
  $('#text-area-id').focus();
});

check here: http://jsfiddle.net/jxrS7/

aularon
Thanks! It works!
rodrigo3n
You are welcome :) And do not forget to mark accepted answers as accepted
aularon
Done! Won't forget again!
rodrigo3n