I put the jquery.placeholder.js
under assets/javascripts
folder
then apply the function in my coffeescript file and works fine.
$(document).ready ->
$('input, textarea').placeholder();
However, When I run in production mode by RAILS_ENV=production rails s
Raise not a function error
on Firebug console
I put other related files on gist
取消注释行:config / enviroments / production.rb中为50,并在其中添加jquery.placeholder.js
以对其进行预编译
config.assets.precompile += %w( jquery.placeholder.js )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.