I’m looking at this changeset http://dev.rubyonrails.org/changeset/5057
and I’m running edge revision 5196 so I’m assuming multiple id’s on
element.hide would work.
I’m getting parse errors though
Also, right now I’ve created 5 divs , each one with STYLE=“display:
none;”
Then I have 5 seperate link_to_remotes with :after => Element.show
(‘somediv’)
However , what I can’t seem to figure out is what one element is showing
and
another is clicked
then 2 divs are showing.
I would like 1 div at a time, where the first one goes away when the
second
is clicked ?
Is there a way to do this ?
then 2 divs are showing.
I would like 1 div at a time, where the first one goes away when the
second
is clicked ?
Is there a way to do this ?
You can Element.hide each of 5 divs before Element.show’ing the next one.
Also, right now I’ve created 5 divs , each one with STYLE=“display: none;”
Then I have 5 seperate link_to_remotes with :after =>
Element.show(‘somediv’)
However , what I can’t seem to figure out is what one element is showing and
another is clicked
then 2 divs are showing.
I would like 1 div at a time, where the first one goes away when the second
is clicked ?
Is there a way to do this ?
You can Element.hide each of 5 divs before Element.show’ing the next
one.
You can Element.hide each of 5 divs before Element.show’ing the next one.
Okay, that encouraging, and how would I do this ?
Element.hide(‘div1’);
Element.hide(‘div2’);
Element.hide(‘div3’);
Element.hide(‘div4’);
Element.hide(‘div5’);
Element.show(‘div3’);
or equal in RJS:
[‘div1’, ‘div2’, ‘div3’, ‘div4’, ‘div5’].each do |element_id
page.hide element_id
end
page.show @next_element_id