MediaWiki:Common.js: различия между версиями
Материал из wiki innovation station ss14
Userr (обсуждение | вклад) Нет описания правки |
Userr (обсуждение | вклад) Нет описания правки |
||
| Строка 1: | Строка 1: | ||
function | mw.loader.using(['jquery'], function () { | ||
const content = | $(document).ready(function () { | ||
$('.accordion-header').click(function () { | |||
const $content = $(this).next('.accordion-content'); | |||
const $toggle = $(this).find('.accordion-toggle'); | |||
if ($content.is(':visible')) { | |||
$content.slideUp(); | |||
$toggle.text('[развернуть]'); | |||
} else { | |||
$content.slideDown(); | |||
$toggle.text('[свернуть]'); | |||
} | } | ||
} | }); | ||
}); | |||
}); | |||
Версия от 18:00, 24 декабря 2024
mw.loader.using(['jquery'], function () {
$(document).ready(function () {
$('.accordion-header').click(function () {
const $content = $(this).next('.accordion-content');
const $toggle = $(this).find('.accordion-toggle');
if ($content.is(':visible')) {
$content.slideUp();
$toggle.text('[развернуть]');
} else {
$content.slideDown();
$toggle.text('[свернуть]');
}
});
});
});
