 |
|
|  |
| [jQuery]addClass() : 스타일 추가 [removeClass()] |
|
|
 |
10년 전 |
<style type="text/css">
.yellow { background-color:Yellow; border:1px solid red; }
</style>
<script src="js/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
<script type="text/javascript">
//[!] 마우스 오버시 yellow 스타일 적용, 아웃시 yellow 스타일 해제
$(document).ready(function () {
$('#btnClick')
.bind('mouseover', function () { $('#btnClick').addClass('yellow'); })
.bind('mouseout', function () { $(this).removeClass('yellow'); });
});
</script>
<div id="btnClick">
마우스를 올려보세요~
</div>
|
|
추천 : 513 |
추천
목록
|
|
|  |
|