Home Forums Particles Support jl-Tabs select with javascript Reply To: jl-Tabs select with javascript


Tony
Moderator

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

JoomLead Gantry5 Particles 2.2.10 released, new features, bug fixes and more Learn more
Flash Sale. Get Up to 25% Off - Coupon: FLASH25 Shop Now