Solved

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

Posted on 2009-05-04
1
303 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a pageā€¦
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
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)

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now