Solved

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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)

739 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