I have an unordered list which I can expand by clicking on each list element.
list.html.erb
<input id="toggle" type="checkbox" unchecked>
<label for="toggle">
<li>Implementing Bootstrap</li>
</label>
<div id="expand">
...
...
</div>
I am able to go from main.html.erb to list.html.erb right to the the list element by clicking on a link.
main.html.erb
<li><%= link_to "Implementing Bootstrap", list_path(:anchor => "toggle") %></li>
Additionally I want that the checkbox value is checked of the given linked element after I click on the link so the list element on list.html.erb will be exapneded right away.
How can I achieve this?
Aucun commentaire:
Enregistrer un commentaire