WEB TIP/jQuery
Multi Selector ID 찾기
제프
2015. 11. 10. 13:08
jQuery에서 다중 셀럭터를 사용한 경우 어떤 셀렉터를 클릭했는지 알 수 있음
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#id0, #id1, #id2").on("click", function (e) { | |
// 클릭한 아이디 찾기 | |
$thidId = e.target.id; | |
console.log($thisId); | |
}); |