[Seaside] Detect the position of a page div
renggli at gmail.com
Wed Sep 23 06:28:17 UTC 2009
> Alright, I think I'm starting to understand the process of events here. What
> I'm still confused about, however, is exactly what "#text:" does. How is it
> able to render the value of "((html jQuery: #whatever) offset access:
> 'top')" when I can't assign that value to a component variable, render it
> with "#html:", or even show it with Transcript? Is that because the function
the web browser:
(html jQuery: #foo) text: (html jQuery: #bar) offsetLeft
along the following lines:
Have a look at the generated code in FireBug.
> How can I get the offset value and store it in an instance variable then?
Attach this script to the #onStop: handler of the draggable:
callback: [ :value | left := value ] value: (html jQuery: #bar) offsetLeft;
callback: [ :value | top := value ] value: (html jQuery: #bar) offsetTop
Again check out the generated code in FireBug and inspect the request
it triggers off.
More information about the seaside