 |
|
|  |
| JQuery 메서드 한번만 실행 ( One() ) |
|
|
 |
10년 전 |
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> One() 메서드 한번만 실행 </title>
<style type="text/css">
.redColor { color:Red;}
</style>
<script src="../jquery-1[1].3.2-vsdoc2.js"
type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
//[!] bind(), click() 메서드와 달리 one()메서드는 딱한번만
// 실행 되고, 이벤트 해제
$("#my .hover").one("click", function () { alert('한번만'); });
});
</script>
</head>
<body>
<div id="my">
<input type="button" id="btn" value="버튼" class="hover" />
</div>
</body>
</html> |
|
추천 : 537 |
추천
목록
|
|
|  |
|