제이쿼리 질문드립니다~
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>무제 문서</title>
<style type="text/css">
.form textarea {background: #e3edee url('http://img.krkrkrkr.kr/1310/25/0008Q.gif') no-repeat; border:0px; margin: 0px 11px 0px 0px; height: 80px; width: 720px; vertical-align:top; max-width:735px; min-width:700px; max-height:800px; min-height:80px}
</style>
</head>
<body>
<div class="form">
<textarea id="conttent" name="conttent"></textarea>
</div>
</body>
</html>
요렇게 되있는 코드인데요~
textarea를 클릭하면 배경이 흰색으로 바뀌게 하고싶은데 어떻게 해야할까요??
$('#qna_Content').click(function() {
('#qna_Content').attr("style", "background: #FFF; border:1px solid #CCC");
});
요렇게 해봣는데 안되네요;;
<html>
<head>
<meta charset="utf-8">
<title>무제 문서</title>
<style type="text/css">
.form textarea {background: #e3edee url('http://img.krkrkrkr.kr/1310/25/0008Q.gif') no-repeat; border:0px; margin: 0px 11px 0px 0px; height: 80px; width: 720px; vertical-align:top; max-width:735px; min-width:700px; max-height:800px; min-height:80px}
</style>
</head>
<body>
<div class="form">
<textarea id="conttent" name="conttent"></textarea>
</div>
</body>
</html>
요렇게 되있는 코드인데요~
textarea를 클릭하면 배경이 흰색으로 바뀌게 하고싶은데 어떻게 해야할까요??
$('#qna_Content').click(function() {
('#qna_Content').attr("style", "background: #FFF; border:1px solid #CCC");
});
요렇게 해봣는데 안되네요;;
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 4개
아래처럼 소스를 수정해보세요.
$('#conttent').focus(function() {
$('#conttent').css("background", "#FFF");
$('#conttent').css("border", "1px solid #CCC");
});
감사합니다^^
근본적으로 jquery를 링크하지 않고 jquery 방법대로 할수는 없는 것이죠
$('#qna_Content') <--- jquery 용 코드
질문해놓고도 왜 문법이 틀린건 생각하지도 않았을까 황당하네요;;
감사합니다^^