Common.js: 두 판 사이의 차이
CABAL WIKI
편집 요약 없음 |
편집 요약 없음 |
||
| 20번째 줄: | 20번째 줄: | ||
// 드래그 가능하게 설정 | // 드래그 가능하게 설정 | ||
$('#toc').draggable({ | |||
containment: 'window', | |||
scroll: false | |||
}); | |||
}); | |||
mw.loader.using('jquery.ui', function () { | |||
$('#toc').draggable({ | $('#toc').draggable({ | ||
containment: 'window', | containment: 'window', | ||
2025년 7월 10일 (목) 04:11 판
/* 이 자바스크립트 설정은 모든 문서, 모든 사용자에게 적용됩니다. */
$(document).ready(function () {
$('#bodyContent a.external').attr('target', '_blank').attr('rel', 'noopener noreferrer');
});
$(function () {
// 목차 박스가 존재할 경우에만 실행
if ($('#toc').length === 0) return;
// 스타일 설정
$('#toc').css({
position: 'fixed',
top: '200px',
left: '30px',
zIndex: 1000,
cursor: 'move'
});
// 드래그 가능하게 설정
$('#toc').draggable({
containment: 'window',
scroll: false
});
});
mw.loader.using('jquery.ui', function () {
$('#toc').draggable({
containment: 'window',
scroll: false
});
});