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.
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
page.array_of_divs.each do |div|
page.visual_effect :highlight, div
end
How do I pass an array from controller?
I am using [email protected]
but it doesn’t work
some template compile error
On 23 Sep 2008, at 18:56, Vapor … wrote:
page.array_of_divs.each do |div|
page.visual_effect :highlight, div
endHow do I pass an array from controller?
I am using [email protected]
@newitems.each do |item|
…
end
Fred