这里的fiddle效果很好。但是当我使用load
函数呈现此表单时,jquery
无效。
以下是加载的代码。( coffee script
)
$(document.body).ready ->
$(".click").mouseenter ->
$(".content-wrapper").load "emain #eform"
return
return
表单完整显示但jQuery
缺失。
这是日志:
Started GET "/emain" for 127.0.0.1 at 2014-02-24 22:52:57 +0530
Processing by EmployeeController#emain as HTML
Emp Load (1.0ms) SELECT "emps".* FROM "emps" WHERE "emps"."id" = 2 ORDER BY "
emps"."id" ASC LIMIT 1
Rendered employee/_form.html.erb (4.0ms)
Rendered employee/_content.html.erb (10.0ms)
Rendered employee/emain.html.erb within layouts/application (18.0ms)
Completed 200 OK in 66ms (Views: 64.0ms | ActiveRecord: 1.0ms)
Started GET "/assets/logo.png" for 127.0.0.1 at 2014-02-24 22:52:57 +0530