On Tue, Sep 23, 2008 at 2:14 AM, Vapor ..
<[EMAIL PROTECTED]>wrote:

>
> I have an array with many DIV ids.
> I want to highlight all at once.
> The current...
> page.visual_effect :highlight, "div_id"
> only takes one div id.


Hi, you should be able to do the following:

Using RJS:

page.array_of_divs.each do |div|
   page.visual_effect :highlight, div
end

or

page.array_of_divs.each do |div|
   page[ div ].visual_effect :highlight
end

Using Prototype Javascript Library:

array_of_divs.each( function( value ) {
   value.visualEffect( "highlight" );
});

Good luck,

-Conrad

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to