728x90
반응형
jQuery
jQuery란? 오픈 소스 기반의 자바스크립트 라이브러리입니다.
제이쿼리를 사용하면 짧고 단순한 코드로도 웹 페이지에 다양한 효과나 연출을 적용할 수 있습니다.
달러($) 기호는 제이쿼리를 의미하고, 제이쿼리에 접근할 수 있게 해주는 식별자입니다.
제이쿼리를 사용하면 짧고 단순한 코드로도 웹 페이지에 다양한 효과나 연출을 적용할 수 있습니다.
달러($) 기호는 제이쿼리를 의미하고, 제이쿼리에 접근할 수 있게 해주는 식별자입니다.
Download 방식
01. JQuery 를 사용하려면 인터넷 익스플로러에서 https://jquery.com/download 에 접속하여 다운받으시기 바랍니다.
<script type="#" src="https://code.jquery.com/jquery-3.2.0.min.js" ></script>
CDN 방식
02. JQuery 를 사용하려면 경로를 head 태그 내에 명시해주어야 합니다.
<script type="#" src="https://code.jquery.com/jquery-3.2.0.min.js" ></script>
jQuery 기본 형식
jQuery는 기본적으로 &(docment).ready()로 시작합니다.
ready()는 jQuery 이벤트로 자바스크립트의 load 이벤트와 유사한 기능을 가지고 있습니다.
ready()는 jQuery 이벤트로 자바스크립트의 load 이벤트와 유사한 기능을 가지고 있습니다.
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>기본 형식</title>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function(){
실행문;
});
</script>
</head>
<body>
</body>
</html>
&(docment).ready()를 짧게도 표현할 수도 있습니다.
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>jQuery Migrate Plugin</title>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(function(){
실행문;
});
</script>
</head>
<body>
</body>
</html>
728x90
댓글