我試圖將JQuery整合到Rails 3中。我已經從http://github.com/rails/jquery-ujs下載了rails.js文件,並將它包含在我的應用程序中。我還包括JQuery。Element.update不是函數[Rails 3 + JQuery]
但是,當我試圖做一個簡單的page.replace像這樣:
render :update do |page|
page.replace_html "my_div", :partial => "my_partial", :locals => {:mylocal => mylocal}
end
我得到的JavaScript拋出下面的錯誤執行:
RJS error:
TypeError: Element.update is not a function
Element.update("my_div", "mypartialdata");
任何想法?
遵循指引。 – GnrlBzik 2012-02-23 17:47:18