1
jquery의 전문가가 아니며이 함수를 이식하는 데 도움이 필요합니다.함수 프로토 타입을 포팅하는 데 도움 - jquery 1.4
auto_complete: function(controller, focus) {
if (this.autocompleter) {
Event.stopObserving(this.autocompleter.element);
delete this.autocompleter;
}
this.autocompleter = new Ajax.Autocompleter("auto_complete_query", "auto_complete_dropdown", "/admin/" + controller + "/auto_complete", {
frequency: 0.25,
afterUpdateElement: function(text, el) {
if (el.id) {
window.location.href = "/admin/" + controller + "/" + escape(el.id);
} else {
$("auto_complete_query").value = "";
window.location.href = window.location.href;
}
}
});
$("auto_complete_dropdown").update("");
$("auto_complete_query").value = "";
if (focus)
$("auto_complete_query").focus();
},
누구든지 도와 줄 수 있습니까?
우리는 당신의 일을하기 위해 여기에 있지 않습니다. "jQuery에서 프로토 타입 foo()와 동등한 것"과 같은 구체적인 질문이 있으면 알려주십시오. 또한 : 왜 당신은 아무것도 모르는 프레임 워크로 이식 할 필요가 있습니까? –