[Seaside] Re: Scriptaculous events
Alan Capewell
alan.capewell at softwareag.co.uk
Fri Jan 5 09:31:44 UTC 2007
Florian Minjat <florian.minjat <at> emn.fr> writes:
>
> Hi,
> I would like to make a div show/hide by clicking on a link but
> entirely client-side (without communication with the image). I already
> know how to make it via scriptaculous updater but it can take a few
> seconds and I want to make it quicker. I tought of testing the events
> of Scriptaculous but could find any example besides this code in
> SUObjectTest>>testEventActions :
> SUEvent new event: 'foo'; on: 'click' do: SUElement new toggle.
> I tried use it with the script: message but no effect :
> html div script: (SUEvent new event: 'foo'; on: 'click' do:
> SUElement new toggle); with: 'test'.
>
> Does anybody know how to do that or the location of some
> documentation/examples ?
>
> Florian
>
Hi Florian
I'm using the scriptaculous effects class SUEffect to achieve what you
describe and I can get it working pretty fast by taking the effect duration
down to 0.1 seconds (I also reduce fps to 10 for good measure but I don't
think it's too significant). Try the following...
html anchor
onClick: (html effect
duration: 0.1;
fps: 10;
id: ('nameOfDivToToggle');
perform: #toggleAppear.);
with: 'Toggle'.
Alan
More information about the Seaside
mailing list