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 page.@newitems.each but it doesn't work some template compile error
page.array_of_divs.each do |div| page.visual_effect :highlight, div end
How do I pass an array from controller? I am using page.@newitems.each
@newitems.each do |item| ... end
Fred