<html lang="ko">
<head>
<meta charset="UTF-8">
<title>jQuery Event Method</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script>
$(function() {
$("button").hover(function() { // 모든 <button>요소에 hover 이벤트를 설정함.
$("#text").append("마우스가 버튼 위로 진입하거나 빠져나갔어요!<br>");
});
});
</script>
</head>
<body>
<h1>.hover() 메소드</h1>
<button>마우스를 버튼 위로 가져가 보세요!</button>
<p id="text"></p>
</body>
</html>