Search the api for more info on listeners and what they do, you
shouldn't have any javascript in the html at all apart from including
the files at the top.

On Oct 3, 12:26 am, bluezehn <[EMAIL PROTECTED]> wrote:
> Use a listener in a javascript file.
> So include the javascript file at top, then:
>
> <a href="#" id="mylink">blabla</a>
>
> In javascript file:
>
> document.observe('dom:loaded', function()
> {
>   $('mylink').observe('click', function()
>   {
>     if($('d1').visible()) $('d1').slideUp();
>   });
>
> });
>
> On Oct 2, 10:34 pm, Mads <[EMAIL PROTECTED]> wrote:
>
> > How would i implement this in my code?
>
> > So far i've got
>
> > <a href="#" onclick=" Effect.SlideUp('d1'); return false;">
>
> > Appreciate the help
>
> > On Oct 2, 11:30 pm, bluezehn <[EMAIL PROTECTED]> wrote:
>
> > > Well when Effect.SlideDown is finished the display property of the
> > > element is set to 'none'. So something like this would work very well:
>
> > > if(element.visible()) element.slideUp();
>
> > > On Oct 2, 9:55 pm, Mads <[EMAIL PROTECTED]> wrote:
>
> > > > Hey everyone
>
> > > > I want to call the Effect.SlideUp when I click a link, however, only
> > > > if the effect Effect.SlideDown has been called.
>
> > > > Is there any way to do so?
>
> > > > Thanks
> > > > Mads Hartmann Jensen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to