Solved

How can I use a drop down list to trigger the animated collapse function

Posted on 2009-05-04
1
305 Views
Last Modified: 2012-08-13
Hi- I'm a javascript novice having some success using the animated collapse function (link attached in Code section) which is based on  jquery.min javascript.

Now I need to trigger the collapsing divs from a drop down (select) list and not a link or a button.

How can I use a drop down list to trigger the animatedcollapse function?

Thanks,
d2
http://www.dynamicdrive.com/dynamicindex17/animatedcollapse_suppliment.htm
 
 
// heres what the call to the function looks like:
animatedcollapse.addDiv('divName', 'fade=1,speed=500,group=divGroupName, hide=1')

Open in new window

0
Comment
Question by:dzash2000
1 Comment
 
LVL 10

Accepted Solution

by:
ALaRiva earned 250 total points
ID: 24299721
Call the function from the onChange event of the dropdown.

So you'd have something like the following:

<select ... OnChange="animatedcollapse.addDiv('divName', 'fade=1,speed=500,group=divGroupName, hide=1');">
...
</select>

HTH
- Anthony
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
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…

770 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