Skip to content

Commit 835ca9b

Browse files
committed
allow multiple tab sections with same labels
1 parent 5363352 commit 835ca9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_plugins/jekyll-tabs-lib/template.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<input
55
type="radio"
66
name="<%= @name %>_tabs"
7-
id="<%= tab.anchor %>_description"
7+
id="<%= @name %>_<%= tab.anchor %>_description"
88
data-target="<%= tab.anchor %>"
99
hidden aria-hidden="true"
1010
<%= tab.defaultTab ? 'checked' : ''%>>
1111
<% end %>
1212
<ul hidden aria-hidden="true" class="nav-tab">
1313
<% environment["tabs-#{@name}"].each do | tab | %>
1414
<li class="item-tab">
15-
<label class="item-tab-link" for="<%= tab.anchor %>_description"><%= tab.label %></label>
15+
<label class="item-tab-link" for="<%= @name %>_<%= tab.anchor %>_description"><%= tab.label %></label>
1616
</li>
1717
<% end %>
1818
</ul>

0 commit comments

Comments
 (0)