jQuery <'onLoad:'> event

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

jQuery <'onLoad:'> event

Robert Sirois
Based on the jQuery examples on their website, it appears that the .load() function can be used in the document body. For whatever reason, I cannot emulate that function using the jQuery Seaside method <'onLoadL'> in this context:

self resultList do: [:each | 
html div
id: each question;
                        onLoad: (html jQuery this hide);
style: 'width: 200px; height: 200px; background: blue; position: absolute; top: 10px; left: 10px';
with: [
html text: each option1; break.
html text: each option2; break.
html text: each option3; break.
html text: each option4.
].
].

What I am trying to do is iterate through a survey's questions, but use jQuery effects to transition between the questions. As far as I know, you can't reload the component (as in transitioning to the next question) or jQuery essentially becomes useless. What I ended up doing is stacking all the questions as hidden divs on the page and going through them like a deck of cards.

I would appreciate any advice/direction for this application :)

Thanks,
RS


Microsoft brings you a new way to search the web. Try Bing™ now
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: jQuery <'onLoad:'> event

Lukas Renggli
> What I am trying to do is iterate through a survey's questions, but use
> jQuery effects to transition between the questions. As far as I know, you
> can't reload the component (as in transitioning to the next question) or
> jQuery essentially becomes useless. What I ended up doing is stacking all
> the questions as hidden divs on the page and going through them like a deck
> of cards.

Although you can use the mechanism of jQuery to add load scripts, it
is often easier to use the Seaside infrastructure.

html div
    script: html jQuery this hide;
    with: 'This is hidden on load'

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside