Notice
Recent Posts
Recent Comments
Link
«   2024/11   »
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
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

chapter03 : jQuery_selector 본문

WEB.JQUERY

chapter03 : jQuery_selector

GAWON 2023. 5. 22. 09:20
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="js/jquery-3.4.1.js"></script>
<script type="text/javascript">
	$(function(){
		// 인라인 스타일 방식 (jquery 에서  style == css)
		
		// 1. 단일 옵션 적용
		$(".html").css("color", "yellow");
		$(".css").css("color", "red");
		
		// 2. 다중 옵션 적용
		$("h1").css({"color":"blue"});
		$(".wrap").css({"background-color":"pink"});

		var css = {"font-size":"20px", "background-color":"orange"};
		$("ul li").css(css);
		
	});
</script>
</head>
<body>
	<h1>jQuery</h1>
	<div class="wrap">
		<ul id="web">
			<li class="html">html</li>
			<li class="css">css</li>
			<li class="javascript">javascript</li>
			<li class="jquery">jquery</li>
			<li class="ajax">ajax</li>
		</ul>
	</div>
</body>
</html>

'WEB.JQUERY' 카테고리의 다른 글

chapter01 : jQuery_into  (0) 2023.05.22
chapter02 : jQuery_selector  (0) 2023.05.22
chapter04 : jQuery_mouse_event  (0) 2023.05.22
chapter05 : jQuery_keyboard_evnet  (0) 2023.05.22