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
just detect browser window size change, when keyboard pops up, the browser window size will change
$(window).resize(function() {
var $htmlOrBody = $('html, body'), // scrollTop works on for some browsers, for others
scrollTopPadding = 8;
// get input tag's offset top position
var textareaTop = $(this).offset().top;
// scroll to the textarea
$htmlOrBody.scrollTop(textareaTop - scrollTopPadding);
// OR To add animation for smooth scrolling, use this.
//$htmlOrBody.animate({ scrollTop: textareaTop - scrollTopPadding }, 200);
});