3

Using PhoneGap (not using jQM though)

The user enters text into a textarea and clicks a button. That text is appended to a div. The div is scrollable.

I need it so that when new text is appended - the div will scroll down to the bottom (showing the latest text).

This Works great on desktop - but doesn't work on PhoneGap:

var objDiv = document.getElementById("allarea");
objDiv.scrollTop = objDiv.scrollHeight;

Should I use jQuery Mobile? I noticed they have a tool called $mobile.silentScroll() but I was unsure how to incorporate it. I need to scroll to the bottom of a specific div.

4

0 回答 0