지식 창고
Day1 - jQuery란? 본문
* online test site : https://jsfiddle.net/
* 참고 site : http://www.w3big.com/ko/html/default.html
* API Document : https://api.jquery.com/
* 생활코딩 site : https://opentutorials.org/course/53
1. jQuery란 무엇인가?
1) Element를 선택하는 강력한 방법
2) 선택된 Element를 효율적으로 제어할 수 있는 다양한 수단을 제공
3) Java Script 라이브러리
2. jQuery 테스트하기
* "https://www.w3schools.com/css/tryit.asp?filename=trycss_default" site에서 간단하게 테스트 가능.
<html> <body> <div class="welcome1"></div> <div class="welcome2"></div> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript"> $('.welcome1').html('hello world! coding everybody!').css('background-color', 'yellow'); $('.welcome2').html('hello world! coding everybody!').css('background-color', 'orange'); </script> </body> </html> |
3. jQuery 사용방법
1) 직접 서비스하는 경우
: https://jquery.com/download/ 사이트 접속하여 jQuery 소스코드를 다운로드한다.
: 위의 파일을 서버에 업로드한 후 웹페이지 안에서 자바스크립트를 삽입한다.
2) 구글의 자바스크립트 라이브러리를 사용하는 경우
아래 페이지 접속.
https://developers.google.com/speed/libraries
4. jQuery 문법
$(css selector).method1().method2(); 제어대상(주어) 서술어 |
ex) </div class="welcome1">
$('.welcome1').html('hello world! coding everybody!').css('background-color', 'yellow'); or jQuery('.welcome1').html('hello world! coding everybody!').css('background-color', 'yellow'); |
'프로그래밍 > jQuery' 카테고리의 다른 글
Day5 - jQuery Chain (0) | 2021.08.08 |
---|---|
Day4 - jQuery Seletor (선택자) 두번째 (0) | 2021.08.08 |
Day4 - jQuery Seletor (선택자) 첫번째 (0) | 2021.08.07 |
Day3 - jQuery wrapper (0) | 2021.08.07 |
Day2 - jQuery의 효율성, 편리성 (0) | 2021.07.24 |
Comments