[Last Call] Learn how to a build a cloud-first strategyRegister 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
?
314 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 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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 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…
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

830 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