일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 연습
- PYTHON
- addEventListener
- 코딩
- Event
- topdown
- javascript
- 종속변수
- euler
- 회전
- className
- Unity
- wsl
- vsCode
- 독립변수
- jQuery
- intervals
- setItem
- 도트
- getItem
- 픽셀
- 탑다운
- Quaternion
- 자주 사용하는 Quaternion 함수
- classList
- Lerp
- 도린이
- click
- 웹스크래핑
- 2D
- Today
- Total
쫑가 과정
선택자를 이용한 선택 본문
모든 Selector 적용보기.
Try jQuery Selector
My name is Donald Duck I live in Duckburg I have many friends:
www.w3schools.com
Selector
Selectors | jQuery API Documentation
Select all elements that are in the progress of an animation at the time the selector is run. Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-). Selects elem
api.jquery.com
CSS 선택자를 이용한 선택
See the Pen by jongha (@gajong) on CodePen.
tagName - $("tagName")
id - $("#id")
className - $(".class")
attribute - $("선택자[attName='값']")
//속성변경
.attr("attName", "변경 값")
jQuery Selector
변수 선택한 요소의 저장
요소를 선택하여 변수에 저장한 후, 해당 변수를 사용.
$(function() {
varitems = $("li"); // <li>요소를 모두 선택해 변수 items에 저장.
})
선택한 요소의 필터링
선택한 요소 중에서 더욱 세분화된 선택을 하기 위해 사용.
Filtering | jQuery API Documentation
Reduce the set of matched elements to the one at the specified index. Reduce the set of matched elements to the even ones in the set, numbered from zero. Reduce the set of matched elements to those that match the selector or pass the function’s test. Red
api.jquery.com
예제)
See the Pen by jongha (@gajong) on CodePen.
form 요소의 선택.
입력 양식에 관련된 특정 요소를 손쉽게 선택
Form | jQuery API Documentation
Selects all button elements and elements of type button. Selects all elements of type checkbox. Matches all elements that are checked or selected. Selects all elements that are disabled. Selects all elements that are enabled. Selects all elements of type f
api.jquery.com
예제)
See the Pen by jongha (@gajong) on CodePen.
'JavaScript > jQuery' 카테고리의 다른 글
jQuery 연습, 테스트 (0) | 2021.09.10 |
---|---|
jQuery. 요소의 추가 / 1. 기존 요소의 내부에 추가 (0) | 2021.09.08 |
선택된 요소 접근 (0) | 2021.09.06 |
jQuery? (0) | 2021.09.03 |