티스토리 뷰
728x90
반응형
예전에 북마크 해둔게 있었다.
this와 $(this)의 차이
this는 DOM object 이다.
$(this)는 javascript의 this를 jQuery wrapper로 한번 감싼거라고 생각하면 된다.
$(this)는 jQuery wrapper로 감싼 object이기 때문에 jquery method를 사용할 수 있다. 그러나 javascript의 native method들은 사용할 수 없다.
https://stackoverflow.com/questions/3633270/difference-between-this-and-this-in-jquery
Difference between $(this) and this in jquery
What is the fundamental difference between using $(this) vs this $('.viewComments').click(function(ev){ //returns the desired value alert(this.getAttribute('id')); //Gives an error sa...
stackoverflow.com
728x90
반응형
댓글
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- jQuery
- input
- 북리뷰
- 베리 심플
- claude
- Bash tab
- svn
- config-location
- LocalDate
- window
- Mac
- localtime
- intellij
- 오라클
- springboot
- Spring
- oracle
- JavaScript
- Linux
- Spring Security
- Java
- maven
- Kotlin
- LocalDateTime
- k8s
- docker
- rocky
- mybatis config
- mybatis
- elasticsearch
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
29 | 30 |
글 보관함
반응형