@@ -232,22 +232,22 @@ You can nest captures within each other to represent more complex logic with Liq
232
232
Here are some tabs:
233
233
234
234
<ul class="nav nav-tabs">
235
- <li class="active"><a data-toggle="tab" href ="#tab1">TAB 1 HEADER</a></li>
236
- <li><a data-toggle="tab" href ="#tab2">TAB 2 HEADER</a></li>
235
+ <li class="active"><a data-toggle="tab" data-target ="#tab1">TAB 1 HEADER</a></li>
236
+ <li><a data-toggle="tab" data-target ="#tab2">TAB 2 HEADER</a></li>
237
237
</ul>
238
238
<div class="tab-content">
239
239
<div id="tab1" class="tab-pane fade in active">TAB 1 CONTENT</div>
240
240
<div id="tab2" class="tab-pane fade">TAB 2 CONTENT</div>
241
241
</div>
242
242
243
- You need to adjust the IDs and HREFs to match your use case.
243
+ You need to adjust the `id` and `data-target` values to match your use case.
244
244
245
245
If you have Markdown inside the content of the `<div>`, you need to capture it, then
246
246
print it and run it through the `markdownify` Liquid filter. Here' s a demo:
247
247
248
248
< ul class=" nav nav-tabs" >
249
- < li class=" active" ><a data-toggle=" tab" href =" #tab3" > TAB 1 HEADER< /a></li>
250
- < li><a data-toggle=" tab" href =" #tab4" > TAB 2 HEADER< /a></li>
249
+ < li class=" active" ><a data-toggle=" tab" data-target =" #tab3" > TAB 1 HEADER< /a></li>
250
+ < li><a data-toggle=" tab" data-target =" #tab4" > TAB 2 HEADER< /a></li>
251
251
< /ul>
252
252
< div class=" tab-content" >
253
253
< div id=" tab3" class=" tab-pane fade in active" >
@@ -270,6 +270,38 @@ print it and run it through the `markdownify` Liquid filter. Here's a demo:
270
270
< /div>
271
271
< /div>
272
272
273
+ # ### Synchronizing multiple tab groups
274
+
275
+ Consider an example where you have something like one tab per language, and
276
+ you have multiple tab sets like this on a page. You might want them to all
277
+ toggle together. We have Javascript that loads on every page that lets you
278
+ do this by setting the ` data-group` attributes to be the same. Note that the
279
+ ` data-target` attributes still need to point to unique div IDs.
280
+
281
+ In this example, selecting ` Go` or ` Python` in one tab set will toggle the
282
+ other tab set to match.
283
+
284
+ < ul class=" nav nav-tabs" >
285
+ < li class=" active" ><a data-toggle=" tab" data-target=" #go" data-group=" go" > Go< /a></li>
286
+ < li><a data-toggle=" tab" data-target=" #python" data-group=" python" > Python< /a></li>
287
+ < /ul>
288
+ < div class=" tab-content" >
289
+ < div id=" go" class=" tab-pane fade in active" > Go content here< /div>
290
+ < div id=" python" class=" tab-pane fade in" > Python content here< /div>
291
+ < /div>
292
+
293
+ And some content between the two sets, just for fun...
294
+
295
+ < ul class=" nav nav-tabs" >
296
+ < li class=" active" ><a data-toggle=" tab" data-target=" #go-2" data-group=" go" > Go< /a></li>
297
+ < li><a data-toggle=" tab" data-target=" #python-2" data-group=" python" > Python< /a></li>
298
+ < /ul>
299
+ < div class=" tab-content" >
300
+ < div id=" go-2" class=" tab-pane fade in active" > Go content here< /div>
301
+ < div id=" python-2" class=" tab-pane fade in" > Python content here< /div>
302
+ < /div>
303
+
304
+
273
305
# ## Cards
274
306
275
307
In a Bootstrap row, your columns need to add up to 12. Here are three cards in
0 commit comments