웹/jquery
jQuery 기본 코드(Template), 편집기(jQuery 자동 완성)
SourceTree
2021. 11. 17. 23:23
반응형
jQuery 공식사이트
Download jQuery | jQuery
link Downloading jQuery Compressed and uncompressed copies of jQuery files are available. The uncompressed file is best used during development or debugging; the compressed file saves bandwidth and improves performance in production. You can also download
jquery.com
기본코드
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div>
jquery.html
</div>
<-- 리모트 로드 -->
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<-- 파일 로드 -->
<--<script src="/js/jquery-3.5.1.min.js"></script>-->
<script>
//Document 로딩 완료 이벤트
$(document).ready(function() {
//...
});
//Document 로딩 완료 이벤트 형식2
//$(function(){ //... });
</script>
</body>
</html>
참고) 편집기
1. Visual Studio Code
Visual Studio Code - Code Editing. Redefined
Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.
code.visualstudio.com
2. 이클립스 + Tern Eclipse IDE(무료, 자바스크립트 코딩 시 DOM Api, jQuery 자동 완성 지원)
- 마켓플레이스는 이클립스 구버전(2018.09)까지만 지원
- 그 이후 신버전은 직접 파일 다운로드 받아 설치
- https://github.com/angelozerr/tern.java/releases/download/tern.java-1.2.1/tern.repository-1.2.1.zip
- Help > Install New Software... > 다운받은 파일 선택 후 모두 체크 > 설치 진행
- 프로젝트 우클릭 > Configure > Convert to Tern Project...
- "Browser" 체크 : DOM API 자동 완성
- "jQuery" 체크 : jQuery 자동 완성
- 이 후 설정을 바꿀 때는 프로젝트 우클릭 > Properties > Tern > Modules
반응형