미디어위키:Common.js: 두 판 사이의 차이

StayByMe
둘러보기로 이동 검색으로 이동
편집 요약 없음
태그: 되돌려진 기여
편집 요약 없음
태그: 수동 되돌리기
 
(같은 사용자의 중간 판 8개는 보이지 않습니다)
1번째 줄: 1번째 줄:
/* 이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다. */
/* 이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다. */
$(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년 7월 3일 (수) 03:23 기준 최신판

/* 이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다. */