# Scriptaculous slide effect almost doing what I want

**URL:** <https://forum.kirupa.com/t/scriptaculous-slide-effect-almost-doing-what-i-want/212045>\
**Category:** web dev\
**Created:** [January 8, 2007, 1:04am UTC](https://forum.kirupa.com/t/scriptaculous-slide-effect-almost-doing-what-i-want/212045 "2007-01-08T01:04:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![somnamblst](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@somnamblst](https://forum.kirupa.com/u/somnamblst)\
**Post date:** [January 8, 2007, 1:04am UTC](https://forum.kirupa.com/t/scriptaculous-slide-effect-almost-doing-what-i-want/212045/1 "2007-01-08T01:04:10Z")

</div>

It slides down automatically thanks to \<body onload=“setCurrent(); Effect.SlideDown(‘one’,{duration:2.0}); return false;”\>

and this

```auto
function setCurrent() {
 var w = window.location.href;
 var n = document.getElementById("push");
 var l = n.getElementsByTagName("a");
 for(i=0;i<l.length;i++) {
  if(l*.href == w) {
   l*.className = "current";
  }
 }
}

```

On the page the slide is called like this:

```auto

  <div id="push"> 
  <h2 class="push">Scriptaculous Auto Slide Down</h2>  
  <ul id="push_panel">   
   <li><a href="#" onclick="Effect.toggle('one','slide'); return false;"><img src="banner910x40.gif" width="910" height="40" alt="" border="0" /></a>
    <div id="one" style="display:none;">
     <ul>
      <li id="expandable"><img src="kenwood_910x200.jpg" width="910" height="199" alt="" border="0"></li>
     </ul>
    </div>
   </li>

```

You can see it demoed here:  
[http://www.cincinnati.com/test/slideAutoDown910.html[URL=“http://kids-voting.org/test/slideAutoDown910.html”]](http://www.cincinnati.com/test/slideAutoDown910.html%5BURL=%22http://kids-voting.org/test/slideAutoDown910.html%22%5D)

The entire area enclosed between the HREF is toggle clickable to either slide up or down. I would also like it to be able slide up automatically after a few seconds duration

I am obviously tricking people with the close/replay buttons because the entire 910x40 GIF toggles the slide. Unfortunately I also need for this 910x40 and the 910x200 to be able to click through to a website.

I tryed putting a 910x40 SWF in the HREF and the SWF displays but the slide stops working, no slide but also no errors. I tried calling the SWF in the HREF as an HTML file but then you don’t even see the movie.

thoughts appreciated
