I am looking to utilize the slide down and slide up function within
one click-able item. This is an image that when clicked once will
reveal a menu and when clicked again it will close the menu using
'slide down' and 'slide up'. Here is my sample code I am working with
now:
<script type="text/javascript" language="javascript" charset="utf-8">
// <![CDATA[
var effect_1 = null;
// ]]>
</script>
<a href="#" onclick="effect_1 = Effect.SlideDown('d1',{duration:1.0});
return false;"><img src="logo.gif" width="100" height="55" /></a>
<a href="#" onclick="effect_1 = Effect.SlideDown('d1',{duration:1.0});
return false;">Start slide down</a> |
<a href="#" onclick="effect_1 = Effect.SlideUp('d1',{duration:1.0});
return false;">Start slide up</a>
<div id="d1" style="display:none;"><div style="background-
color:#ff8080;width:100px;border:2px solid red;padding:10px;">
<li>
<a href="#">Menu</a>
<ul>
<li><a href="Link1">Link1</a></li>
<li><a href="Link2">Link2</a></li>
<li><a href="Link1">Link3</a></li>
<li><a href="Link2">Link4</a></li>
</ul>
<a href="#" onclick="effect_1 = Effect.SlideUp('d1',
{duration:1.0}); return false;">Close Menu</a>
</li>
</div></div>
How should I alter this code to achieve my desired result? Thank you
in advance.
--
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 [email protected].
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.