Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Thanks for the helps guys, but I've already found the way of doing this. =) I'm gonna share it with you, so you'll know.</p> <p>First of all, Android 3.x tablets do have scrolling divs.</p> <p>But to make it work on 2.2 and ipad: <a href="http://www.seabreezecomputers.com/tips/touchscroll.js" rel="nofollow">Here's the code I've been using (click on me!)</a></p> <p>So you just pass the id of the div you want to scroll for the touchScroll() method (after of corse including on your html's head) et voilá! =)</p> <p>I've also extended the code (copy > paste code) with another function which accepts an element:</p> <pre><code>function touchScrollElement(element){ if(isTouchDevice()){ var scrollStartPosY=0; var scrollStartPosX=0; element.addEventListener("touchstart", function(event) { scrollStartPosY=this.scrollTop+event.touches[0].pageY; scrollStartPosX=this.scrollLeft+event.touches[0].pageX; },false); element.addEventListener("touchmove", function(event) { if ((this.scrollTop &lt; this.scrollHeight-this.offsetHeight &amp;&amp; this.scrollTop+event.touches[0].pageY &lt; scrollStartPosY-5) || (this.scrollTop != 0 &amp;&amp; this.scrollTop+event.touches[0].pageY &gt; scrollStartPosY+5)) event.preventDefault(); if ((this.scrollLeft &lt; this.scrollWidth-this.offsetWidth &amp;&amp; this.scrollLeft+event.touches[0].pageX &lt; scrollStartPosX-5) || (this.scrollLeft != 0 &amp;&amp; this.scrollLeft+event.touches[0].pageX &gt; scrollStartPosX+5)) event.preventDefault(); this.scrollTop=scrollStartPosY-event.touches[0].pageY; this.scrollLeft=scrollStartPosX-event.touches[0].pageX; },false); } } </code></pre> <p>So that'S the current solution... =)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload