event.isPropagationStopped ()
event.isPropagationStopped ()
설명 : 이 이벤트 객체에서 event.stopPropagation () 이 호출 되었는지 여부를 반환합니다 .
예:
event.stopPropagation ()가 불려 갔는지 여부를 확인합니다.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>event.isPropagationStopped demo</title>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<button>click me</button>
<div id="stop-log"></div>
<script>
function propStopped( event ) {
var msg = "";
if ( event.isPropagationStopped() ) {
msg = "called";
} else {
msg = "not called";
}
$( "#stop-log" ).append( "<div>" + msg + "</div>" );
}
$( "button" ).click(function(event) {
propStopped( event );
event.stopPropagation();
propStopped( event );
});
</script>
</body>
</html>
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4946 | node.js | 6년 전 | 2620 | ||
| 4945 | node.js | 6년 전 | 2391 | ||
| 4944 | node.js | 6년 전 | 2529 | ||
| 4943 | node.js | 6년 전 | 2281 | ||
| 4942 | node.js | 6년 전 | 2262 | ||
| 4941 | node.js | 6년 전 | 2728 | ||
| 4940 | node.js | 6년 전 | 1874 | ||
| 4939 | node.js | 6년 전 | 2003 | ||
| 4938 | node.js | 6년 전 | 2464 | ||
| 4937 | node.js | 6년 전 | 2258 | ||
| 4936 | node.js | 6년 전 | 2329 | ||
| 4935 | node.js | 6년 전 | 2146 | ||
| 4934 | node.js | 6년 전 | 2455 | ||
| 4933 | node.js | 6년 전 | 2257 | ||
| 4932 | node.js | 6년 전 | 2694 | ||
| 4931 | node.js | 6년 전 | 2080 | ||
| 4930 | node.js | 6년 전 | 2008 | ||
| 4929 | node.js | 6년 전 | 8643 | ||
| 4928 | node.js | 6년 전 | 3761 | ||
| 4927 | node.js | 6년 전 | 2401 | ||
| 4926 | node.js | 6년 전 | 2511 | ||
| 4925 | node.js | 6년 전 | 2097 | ||
| 4924 | node.js | 6년 전 | 3382 | ||
| 4923 | node.js | 6년 전 | 2234 | ||
| 4922 | node.js | 6년 전 | 2000 | ||
| 4921 | node.js | 6년 전 | 2053 | ||
| 4920 | node.js | 6년 전 | 1774 | ||
| 4919 | node.js | 6년 전 | 2045 | ||
| 4918 | node.js | 6년 전 | 2187 | ||
| 4917 | node.js | 6년 전 | 2406 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기