미디어위키:Common.js: 두 판 사이의 차이
둘러보기로 이동
검색으로 이동
편집 요약 없음 태그: 수동 되돌리기 |
편집 요약 없음 태그: 되돌려진 기여 |
||
| 1번째 줄: | 1번째 줄: | ||
/* 이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다. */ | /* 이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다. */ | ||
// Add collapsible functionality to sidebar sections | |||
$(document).ready(function() { | |||
// Add a toggle button to each collapsible section | |||
$('.mw-portlet.collapsible .mw-portlet-body').before('<div class="mw-portlet-toggle">[+]</div>'); | |||
// Hide the content of each collapsible section by default | |||
$('.mw-portlet.collapsible .mw-portlet-body').hide(); | |||
// Toggle the content when the toggle button is clicked | |||
$('.mw-portlet-toggle').click(function() { | |||
$(this).next('.mw-portlet-body').slideToggle(); | |||
// Toggle the plus/minus icon | |||
var text = $(this).text() == '[+]' ? '[−]' : '[+]'; | |||
$(this).text(text); | |||
}); | |||
}); | |||
2024년 6월 24일 (월) 23:40 판
/* 이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다. */
// Add collapsible functionality to sidebar sections
$(document).ready(function() {
// Add a toggle button to each collapsible section
$('.mw-portlet.collapsible .mw-portlet-body').before('<div class="mw-portlet-toggle">[+]</div>');
// Hide the content of each collapsible section by default
$('.mw-portlet.collapsible .mw-portlet-body').hide();
// Toggle the content when the toggle button is clicked
$('.mw-portlet-toggle').click(function() {
$(this).next('.mw-portlet-body').slideToggle();
// Toggle the plus/minus icon
var text = $(this).text() == '[+]' ? '[−]' : '[+]';
$(this).text(text);
});
});