[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2009-05-04
1
Medium Priority
?
310 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
[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
1 Comment
 
LVL 10

Accepted Solution

by:
ALaRiva earned 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
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…
Suggested Courses

656 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