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

S.T.E.L.L.A.-WIKI
(새 문서: →‎이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다.: document.addEventListener('DOMContentLoaded', function() { var footnotes = document.querySelectorAll('.fake-footnote'); footnotes.forEach(function(footnote) { footnote.addEventListener('mouseover', function() { var id = footnote.getAttribute('data-footnote-id'); document.getElementById(id).style.display = 'block'; }); footnote.addEventListener('mouseout',...)
 
(문서를 비움)
태그: 비우기
 
(같은 사용자의 중간 판 하나는 보이지 않습니다)
1번째 줄: 1번째 줄:
/* 이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다. */
document.addEventListener('DOMContentLoaded', function() {
  var footnotes = document.querySelectorAll('.fake-footnote');
 
  footnotes.forEach(function(footnote) {
    footnote.addEventListener('mouseover', function() {
      var id = footnote.getAttribute('data-footnote-id');
      document.getElementById(id).style.display = 'block';
    });


    footnote.addEventListener('mouseout', function() {
      var id = footnote.getAttribute('data-footnote-id');
      document.getElementById(id).style.display = 'none';
    });
  });
});

2024년 5월 28일 (화) 05:22 기준 최신판