Navigation bar works on first link, but when other links are clicked items
disappear.
I am trying to list out a side navigation bar. The navigation should say
video, followed by step 1, step 2, and step 3. It works and displays
properly, but strangely, once I go to step 1 from video it instead says
step 0, step 1, step 2, and step 3. When I go to the step 3 - nothing is
displayed. Something is wrong with my code below, and any help would be
appreciated.
<% @step_list.each_with_index do |step, i| %>
<% case step.media_type %>
<% when 'video' %>
<li class="active">
<span class="glow"></span>
<a href="<%= i %>">
<i class='icon-info-sign icon-2x'></i>
<span>Video</span>
</a>
</li>
<% when 'excel' %>
<li class="">
<span class="glow"></span>
<a href="<%= i %>">
<i class="<%= icon[i] %> icon-2x"></i>
<span>Step <%= i %> </span>
</a>
</li>
<% else %>
<li class="dark-nav ">
<span class="glow"></span>
<a href="<%= i %>">
<i class="<%= icon[i] %> icon-2x"></i>
<span>Step <%= i %></span>
</a>
</li>
<% end %>
<% end %>
No comments:
Post a Comment