mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
15 lines
398 B
JavaScript
15 lines
398 B
JavaScript
|
import $ from 'jquery';
|
||
|
|
||
|
$('body').on('touchstart click', '[data-tabid]', (event) => {
|
||
|
event && event.stopPropagation();
|
||
|
let target = $(event.currentTarget);
|
||
|
|
||
|
const panel = $(`[id="${target.data('tabid')}"]`);
|
||
|
|
||
|
target.siblings('[data-tabid]').removeClass('active');
|
||
|
target.addClass('active');
|
||
|
|
||
|
panel.siblings('[id]').removeClass('active');
|
||
|
panel.addClass('active');
|
||
|
});
|