요소의 '데이터'로 설정된 객체에서 함수 내에서 요소를 가져 오는 방법이 있습니까? 아무 것도 없으면이를 구현할 수있는 대체 방법은 무엇입니까?jQuery - 데이터 객체 내부에서 요소를 가져 오는 방법
var m = function(options){
// Some initialization code here
}
m.prototype.doSomething: function() {
// How do i get the #an_element here?
}
$("#an_element").data('myObject', m);
요소를 생성자에 전달하지 않아도되도록하는 방법을 찾으려고했습니다. – arvinsim