[Seaside] Detect the position of a page div

Lukas Renggli renggli at gmail.com
Tue Sep 22 08:14:48 UTC 2009

I don't understand what you are asking for, but what about something along?

html jQuery ajax
   callback: [ :left | Transcript show: left ]
   value: (html jQuery offset access: 'left');
   callback: [ :top | Transcript show: top ]
   value: (html jQuery offset access: 'top')

I am just adding a few convenience methods that should make things
like this easier.


2009/9/22 Robert Sirois <watchlala at hotmail.com>:
> Is there a way to detect the offset of a given element on a page? The
> following simply returns '$this.offset()'.
>     html div
>         id: 'bob';
>         script: ((html jQuery new draggable) onDrag: (html jQuery ajax
> script: [:s | s add: ((html jQuery: #bob) html: (html jQuery: #bob)
> offset)]));
>         with: html jQuery this offset.
> Thanks!
> RS
> ps.
> If it helps, the purpose of this function is to let the server know if a map
> is being moved in order to buffer the new tiles; essentially, a tiling
> script (ie. Google maps).
> ________________________________
> Hotmail® has ever-growing storage! Don’t worry about storage limits. Check
> it out.
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Lukas Renggli

More information about the seaside mailing list