Solved

SlideUp Slide down automatically

Posted on 2008-10-14
2
2,349 Views
Last Modified: 2013-11-11
I'm trying to use script.aculo.us to slide up/down a panel - I want to use the same area to drop it down if it's up, and vice versa.  Is there a built in way to do this?  I've got the following hack working, but it's kinda ugly.

<div onclick="if (contDown) Effect.SlideUp('content', { duration: 0.5 }); else Effect.SlideDown('content', { duration: 0.5 }); contDown = !contDown;">
0
Comment
Question by:ARACK04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
mltsy earned 500 total points
ID: 22717927
I'd say that's about as concise as you're going to get (give or take a few characters).  If you aren't using scriptaculous for too much else, you could try Mootools.  Not to steal users from scriptaculous, but I have had a better experience so far with Mootools, and it has a toggle function exactly like what you're looking for :) ...

http://mootools.net/docs/Plugins/Fx.Slide#Fx-Slide:toggle
0
 

Author Comment

by:ARACK04
ID: 22718068
scriptaculous is built into rails, so I'll stick with it.  Thanks!
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to filter by key press ? 6 57
dynamic created check uncheck boxes 6 42
Use javascript to open specific place on an accordian in other page 8 41
Boolean 13 24
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question