-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
想請教一下,如何讓這個Alert訊息過幾秒後自動消失? #33
Comments
注意執行的順序,不知道你在哪裡執行 fadeOut 的 function |
我只是用 Rails 101s 的範例 |
/cc @sdlong |
兩個方式
$(function() {
$(".alert").fadeOut(3000)
}) |
我用的是 <% bootstrap_flash %> 我把 <script type='javascript/text'> $(function() { $(".alert").fadeOut(3000) }) </script>放到 app/views/layouts/application.html.erb 的 上面,不知道為何沒反應 >"< 2015-10-06 1:39 GMT+08:00 Ching-Han Ho notifications@github.com:
◢▄◣ 蘇介吾 / 家住楊梅市新農街 |
任意一種都可以 |
SDLyu 可以了,謝謝 ^_^ |
如題, 我有看到網路上建議用 $(".alert").fadeOut(3000) ,放在 app/assets/javascripts/XXX.coffee ,可是好像沒用 >"<
The text was updated successfully, but these errors were encountered: