Dantes (обсуждение | вклад) Нет описания правки |
Dantes (обсуждение | вклад) Нет описания правки |
||
| Строка 12: | Строка 12: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
$(".timeline-header").click(function() { | $(".timeline-header").click(function() { | ||
var | var periodId = $(this).attr("id"); | ||
if (periodId) { | |||
var period = periodId.replace("header-", ""); | |||
toggleTimeline(period); | toggleTimeline(period); | ||
} | } | ||
}); | }); | ||
}); | }); | ||
Версия от 07:13, 17 января 2025
function toggleTimeline(period) {
var content = document.getElementById('content-' + period);
if (content) {
if (content.style.display === "none") {
content.style.display = "block";
} else {
content.style.display = "none";
}
}
}
$(document).ready(function() {
$(".timeline-header").click(function() {
var periodId = $(this).attr("id");
if (periodId) {
var period = periodId.replace("header-", "");
toggleTimeline(period);
}
});
});