[Seaside] How to write jQuery $.ready scripts?
Davorin Rusevljan
davorin.rusevljan at gmail.com
Fri Jan 1 22:31:43 UTC 2010
I guess I am a bit dense right now, so forgive me if I am askig obvious.
So, I would like to have few jQuery operations executed when DOM is
ready. My best so far is:
renderContentOn: html
html script: (html jQuery
ready: ( (html jQuery: #glavati)
text: 'Njurko';
on: 'click' do: 'alert("gotcha");' )).
html script: (html jQuery
ready: 'alert("aha");' ).
html heading
level: 1;
id: #glavati;
with: 'Gurko'.
Which does get job done, but in generated html it opens javascript tag
twice which is kind of ugly (especially if I would have more
operations in the future). So how would I structure code above so that
generated code has just one script tag? Or even better, has one script
tag, and also just one $.ready with 2 statements in it?
Or I am doing it backwards and should put all that code in plain
javascript file and just include it as is?
Am I missing something or there is no Seaside binding for
jQuery(..).click() function? (I am using Dolphin port of Seaside which
is 2.9.something)
Many thanks!
rush
http://www.cloud208.com/
More information about the seaside
mailing list