views:

28

answers:

2

I've created a long form of multiple items that each have a checkbox next to them. What I want to do is allow users to check all the lines that they don't want, and then have scriptaculous use the Effects.Dropout function to get rid of all of them.

Is there an easy way to loop through all of the selected items and drop them?

A: 

If you're using jQuery or Prototype you have access to the .map methods which would allow you to apply an effect to everything you select.

Take a peek at http://api.jquery.com/map/. There are some great examples but let me know if you need more help.

Chuck Vose
A: 

$$('body').first().select('input:checked').invoke('dropOut');

This is Prototype.js code.

Christian