Hey all,
I have several divs like this:
<div class="collapseme" style="display:none" >blabal</div>
<div class="collapseme" style="display:none">blabal</div>
I would like to do a link_to_function or link_to_remote to make them
visible all by one click.
Hey all,
I have several divs like this:
<div class="collapseme" style="display:none" >blabal</div>
<div class="collapseme" style="display:none">blabal</div>
I would like to do a link_to_function or link_to_remote to make them
visible all by one click.
Any idea how to do that?
You can do this with 'link_to_remote' with the request to e.g. 'change' action.
But instead of 'change.rhtml' use 'change.rjs' template.
Inside this template you can use e.g. 'page.show' for as many divs as you wish. You should give your divs 'id' parameter to reference them in 'page.show' methods.