jQuery <'onLoad:'> event

2 messages Options
Embed this post
Permalink
Robert Sirois

jQuery <'onLoad:'> event

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
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
Lukas Renggli

Re: jQuery <'onLoad:'> event

Reply Threaded More More options
Print post
Permalink
> 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