Quantcast
Viewing all articles
Browse latest Browse all 10

.bind()

element 에 대한 각종 event 처리기 함수이다.

사용자 이벤트, 브라우저 이벤트 등등 각종 이벤트에 대해 바인딩하는 함수이다.
사용예제는 다음과 같다.
가장 기본적인 사용방법
$('#foo').bind('click', function() {
  alert('User clicked on "foo."');
});
다중 이벤트 바인딩
$('#foo').bind('mouseenter mouseleave', function() {
  $(this).toggleClass('entered');
});

Viewing all articles
Browse latest Browse all 10