How To Make Div Scrollable Using Javascript
I am working on Tizen and making web app. I have a div in html5 and I set and image as background on this div. Now i have some scenario in which I have to show some random text i
Solution 1:
I believe id you style it to overflow:scroll
that should take care of it.
EDIT:
Look at setting overflow-x:hidden
and overflow-y:auto
YET ANOTHER EDIT: Perhaps this: https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.web.appprogramming%2Fhtml%2Fguide%2Fui_guide%2Fui_framework_scrollview.htm
Solution 2:
Try this :- First fix the height and width of the <div>
then set the overflow:auto
.
document.getElementById("textView").setAttribute("style","overflow:auto;height:90px;width:500px");
or you can try
document.getElementById("textView").style.width='500px';
document.getElementById("textView").style.height='90px';
document.getElementById("textView").style.overflow='auto';
Hope it will help you.
Solution 3:
i used iscroll for scrolling in my mobile app,Hope it may help you
Solution 4:
I've experienced similiar problem when I was developing an ap in tizen.Overflow scroll for both axis didn't do the trick.The prob was contents was of fixed position and it didn't belonged to the scrollable division.Check that mate!
Post a Comment for "How To Make Div Scrollable Using Javascript"