【发布时间】:2013-09-13 15:39:55
【问题描述】:
我的 xxx.js.coffee 的内容:
$->
$("#clk").click ->
alert "hello world"
$("#clk1").click ->
alert "hello"
id "clk" 在 index.html.erb 中,而 "clk1" 在 show.html.erb 中
当我在“index.html.erb”时,咖啡可以工作,但是当我跳到“show.html.erb”时,它不会提醒任何东西。
我该如何解决?
【问题讨论】:
标签: coffeescript ruby-on-rails-4