2010-05-01 8 views

답변

2

JQuery와 Event object는 DOM 트리를 버블 링 이벤트를 방지하기 위해 크로스 브라우저 방법입니다 stopPropagation 방법을 구현한다. 예 : 마음에

// when an anchor with id of someElement gets clicked 
$("#someElement").click(function(e) { 
    e.stopPropagation(); 
}); 

곰, return false 모두 e.preventDefault()e.stopPropagation()를 호출하는 것과 같은 효과가 있습니다.