프로그램 개발서

jQuery > .on() 본문

jQuery

jQuery > .on()

rairen 2023. 5. 8. 10:47

on() API 문서

https://api.jquery.com/on/

 

.on() | jQuery API Documentation

Description: Attach an event handler function for one or more events to the selected elements. The .on() method attaches event handlers to the currently selected set of elements in the jQuery object. As of jQuery 1.7, the .on() method provides all function

api.jquery.com

 

 

1. on(event, handler)
$(selector).on("click", function(event){
	// 코드 작성
});

 

반응형