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

(문서를 비움)
태그: 비우기
편집 요약 없음
1번째 줄: 1번째 줄:
$(document).ready(function() {
    var count = 1;  // 숫자 시작


    $('h2, h3, h4, h5, h6').each(function() {
        var backLink = $('<a>')
            .attr('href', '#toc')  // 목차 id
            .text(' [' + (count++) + ']')  // 숫자 표시
            .css({
                'font-size': 'small',
                'margin-left': '10px',
                'text-decoration': 'none',  // 밑줄 없애기
                'color': 'gray'              // 색 살짝 변경
            });
        $(this).append(backLink);
    });
});

2025년 4월 26일 (토) 21:26 판