Coder Social home page Coder Social logo

Comments (7)

zackexplosion avatar zackexplosion commented on May 20, 2024

注意執行的順序,不知道你在哪裡執行 fadeOut 的 function

from ama.

afgnsu avatar afgnsu commented on May 20, 2024

我只是用 Rails 101s 的範例
http://github.com/afgnsu/rails101s

from ama.

JuanitoFatas avatar JuanitoFatas commented on May 20, 2024

/cc @sdlong

from ama.

chinghanho avatar chinghanho commented on May 20, 2024

兩個方式

  1. 把載入 script 的 tag 放到 <body> 最後面
  2. 把 callback 放在 document ready 內:
$(function() {
  $(".alert").fadeOut(3000)
})

from ama.

afgnsu avatar afgnsu commented on May 20, 2024

我用的是 <% 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 [email protected]:

兩個方式

  1. 把載入 script 的 tag 放到 最後面
  2. 把 callback 放在 document ready 內:

$(function() {
$(".alert").fadeOut(3000)
})


Reply to this email directly or view it on GitHub
#33 (comment).

◢▄◣ 蘇介吾 / 家住楊梅市新農街
○○█ Mobile: 0921-380997
◥○◤ Email : [email protected]
▂██ FB: http://fb.me/afgnsu
▂█◤ Website : afgn.idv.tw

from ama.

SDLyu avatar SDLyu commented on May 20, 2024

<script type='javascript/text'>type 宣告錯了,應該寫成下面這樣

  1. <script type='text/javascript'>...</script>
  2. <script>...</script>

任意一種都可以

from ama.

afgnsu avatar afgnsu commented on May 20, 2024

SDLyu 可以了,謝謝 ^_^

from ama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.