On Jun 6, 2011, at 9:26 AM, Eric wrote:

I did try it on Chrome on Windows with success:
Google Chrome   11.0.696.77 (Build officiel 87952)
WebKit  534.24 (branches/chromium/696@86868)
V8      3.1.8.16
Agent utilisateur       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/
534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

I tried on Android 2.3.4's native browser (Chrome Mobile, no idea of
the version number) but the scrollbar is missing, so no way to know if
the property is supported.

Try two-finger dragging within the scrolled text box, that works on MobileSafari, but no idea if it also works in Android. (Hey, they've stolen every other idea, why not that...)


It also works on Linux/Firefox3.5.7

So by works, you mean both the Prototype version and the native version of the offset calculation reported the same offset number while you scrolled?

Walter


Eric

On Jun 3, 5:55 pm, Walter Davis <wa...@wdstudio.com> wrote:
On Jun 3, 2011, at 11:21 AM, Eric wrote:





On Jun 1, 4:33 pm, Walter Davis <wa...@wdstudio.com> wrote:
On Jun 1, 2011, at 10:19 AM, Eric wrote:

On May 31, 5:51 pm, Walter Davis <wa...@wdstudio.com> wrote:
On May 31, 2011, at 11:12 AM, bill wrote:
I need the scroll of the div contents only.

You can back into that by using the cumulative offset, and
subtracting
the document.viewport.getScrollOffsets() from that.

Or you may use yourdiv.scrollTop and yourdiv.scrollLeft

Eric

I knew there was something simpler! Is that completely cross-
platform?
I ask because I suspect it's native, and therefore not in the
Prototype Element namespace. Does that mean that it's safe to use in
all browser/OS combos?

Not sure about the "all" browser/OS combo, but it works on Windows on
IE6+ and FF2+ (and possibly on older versions).
I would be interested to know if it works on Safari/Chrome and on OSX/
Linux.

Anyone who has a moment, please test this out here:

http://scripty.walterdavisstudio.com/scroll-offsets.html

All the script is inline for ease of criticism!

Walter

Eric

Walter

--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en
.



--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en .


--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to