1) Using *onClick*, is *never* a good idea.
2) When using *onClick*, you need to define the function outside of the *
domready/load* event (select "no wrap" from the dropdown on the left)

___

Oskar Krawczyk
http://nouincolor.com


On Wed, Feb 24, 2010 at 10:18 AM, Romain <[email protected]>wrote:

> Hi, my script beloow doesn't work and I can't figure out why !
>
> window.addEvent('domready', function(){
>                function DoSlide(Link){
>                        var myDiv = $('cont');
>                        var mySlide = new Fx.Slide(myDiv, {mode:
> 'vertical'});
>                        mySlide.toggle();
>                }
>        });
>
> I also made two mootshells to demonstrate the simple issue.
>
> This script works : http://mootools.net/shell/ggvW5/
> But this one doesn't : http://mootools.net/shell/E7ced/
>
> Thanks in advance,
> Romain
>

Reply via email to