I have a PhoneGap application that when it opens an HTML page, I want it to scroll to a specific <div> element. So far I've been able to make it do that with this script using jQuery:
<script>
$(document).delegate('.ui-page', 'pageshow', function () {
var offset = $(this).find('#timeindicatordiv').offset().top;
setTimeout(function () {
$.mobile.silentScroll(offset);
}, 0);
});
</script>
This only gives me a jump directly to the <div> which looks a bit choppy.
Is there any way to give this a smooth animation?