멋쟁이사자처럼 프론트엔드 스쿨 2기 38_Day

aydennote·2022년 5월 25일
0
post-thumbnail

📖 오늘 학습 뽀인트!

  1. jQuery

1. jQuery

🕵️‍♀️ jQuery란?
자바스크립트의 유명한 라이브러리로 프로그래밍 효율을 높여준다. 다만, 더 좋은 라이브러리, 프레임워크가 많기 때문에 예전에 비해 사용이 많이 줄었다.


✍ jQuery를 사용하는 이유
1. 빠르고 작다.
2. 요소 선택과 제어 방법이 간단하다.
3. 여러 플러그인들이 아직 jQuery를 사용하기 때문에 어쩔 수 없이 사용한다.


$("p").hide();
$("#test").show();
$(".test").click(function(){
	alert("클릭!");
});
$(".test").click(function(){
	$(this).css('color', 'red');
});
$('.test').text('hello world');
$('#test').html('<b>hello</b> world');
$('#test').css('color', 'red');
$('img').attr('src', 'a.jpg');
$('p#two').text('hello world');

간단한 사용법은 위 소스코드와 같고 특정 기능이 필요할 때, 공식 문서를 살펴보며 사용하면 될 것 같다.

profile
기록하는 개발자 Ayden 입니다.

0개의 댓글