0
我用下面的代碼來自動駁回on Rails應用程序在我的紅寶石的成功提醒:自動辭退引導警報停在Rails的工作
$ ->
flashCallback = ->
$(".alert-success").fadeOut()
$(".alert-success").bind 'click', (ev) =>
$(".alert-success").fadeOut()
setTimeout flashCallback, 3000
隨着相關警戒線:
<div class="alert alert-<%= name.to_s == "notice" ? "success" : "danger" %> alert-dismissable">
一切都很好,但似乎一直在打破。
我所有的代碼可以在這裏找到:https://github.com/vroomanj/updemo
有沒有完成我想要完成什麼更好的辦法?有沒有人看到我正在做的事情可能導致它停止工作的任何錯誤?我希望我能說當它停止工作,但我剛纔注意到。