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()的等价物”让我们知道。另外:为什么你需要把它移植到一个你不了解的框架? – 2010-02-11 14:03:45