I am using html5/javascript/jQuery/css for mobile app development. I have multiple textareas in the app. When I click on that to input, keyboard popup (android tab). But the tex
with jQuery, get the textarea's offset().top value then set document scroll position using scrollTop()
var $htmlOrBody = $('html, body'), // scrollTop works on for some browsers, for others
scrollTopPadding = 8;
$('textarea').focus(function() {
// get textarea's offset top position
var textareaTop = $(this).offset().top;
// scroll to the textarea
$htmlOrBody.scrollTop(textareaTop - scrollTopPadding);
});
jsfiddle example