如何隱藏未檢查的所有<li>
元素。什麼是最好的方法來做到這一點? Ruby還是JavaScript?隱藏所有未檢查的列表元素,Ruby或JavaScript
<h3>Stores Offered In</h3>
<ul class="multi-column-checkbox">
<% for store in Store.all %>
<li><%= check_box_tag "idea[store_ids][]", store.id,
@idea.stores.include?(store) %> <%= store.name %></li>
<% end %>
</ul>
<br />
您是否需要在用戶的瀏覽器呈現它之前或之後執行此操作? –