
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
console에
homework.html:15
Uncaught ReferenceError: $ is not defined
at homework.html:15:3
라고 나오네요.. 무슨 제이쿼리 설정 방식이 틀렸다는데 아무리 해도 안 돼요..
작성한 코드 및 에러 메세지
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="ftisland.css">
<title>FTisland 팬클럽</title>
<script>
$(document).ready(function(){
$.ajax({
type: "GET",
url: "http://spartacodingclub.shop/sparta_api/weather/seoul",
data: {},
success: function(response){
let rows = response['RealtimeCityAir']['row']
for(let i=0; i < rows.length; i++ ){
let gu_name = rows[i]['MSRSTE_NM']
let gu_mise = rows[i]['IDEX_MVL']
console.log(gu_name, gu_mise)
}
}
})
});
</script>
</head>
<body>
<div class="web_main">
<h1>FTisland의 팬명록</h1>
<p>현재기온: <span id="temp">00.0도</span></p>
</div>
<div class="web_post">
<div class="form-floating mb-3">
<input type="text" class="form-control" id="floatingInput" placeholder="name@example.com">
<label for="floatingInput">닉네임</label>
</div>
<div class="form-floating">
<textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea"></textarea>
<label for="floatingTextarea">응원댓글</label>
</div>
<div class="btnDark">
<button type="button" class="btn btn-dark">응원 남기기</button>
</div>
</div>
<div class="web_content">
<div class="form-floating">
<input type="email" class="form-control" id="floatingInputGrid" placeholder="name@example.com" value="-김민재">
<label for="floatingInputGrid">새로운 앨범 너무 멋져요!</label>
</div>
<div class="form-floating">
<input type="email" class="form-control" id="floatingInputGrid" placeholder="name@example.com" value="-김또깡">
<label for="floatingInputGrid">새로운 앨범 너무 멋져요!</label>
</div>
<div class="form-floating">
<input type="email" class="form-control" id="floatingInputGrid" placeholder="name@example.com" value="-구마적">
<label for="floatingInputGrid">새로운 앨범 너무 멋져요!</label>
</div>
</div>
</body>
</html>
