Home › Forums › Particles Support › jl-Tabs select with javascript › Reply To: jl-Tabs select with javascript
Tony
Hi Sven,
Open jltabs.html.twig and find line 387, you can special tab index for items using active option. Let say you want to set the active class for 2nd item. The original code looks like:
<ul class="jl-tab{{tab_alignment}}{% if particle.tab_margin == 'default' %} jl-margin{% else %} jl-margin-{{ particle.tab_margin|e }}{% endif %}" jl-tab="connect: #js-{{id}};{{tab_animation}}">
change to
<ul class="jl-tab{{tab_alignment}}{% if particle.tab_margin == 'default' %} jl-margin{% else %} jl-margin-{{ particle.tab_margin|e }}{% endif %}" jl-tab="connect: #js-{{id}}; active: 1;{{tab_animation}}">
Simply pass the option active: 1
to specify the active index on init (for 2nd item).
Thank you