त्रुटि मैं चाहता हूँ दिखाने के लिएमैं अपने त्रुटि संदेशों को कैसे फीका कर सकता हूं? RubyOnRails में 3
flash[:error] = "Invalid username/password combination."
मैं कोशिश की है
$(document).ready(function() {// When the Dom is ready
$('.error').hide();//Hide the div
$('.alert').hide();
$('.notice').hide();
$('.success').hide();
$('.info').hide();
$(".error").fadeOut(2000); //Add a fade out effect that will last for 2000 millisecond
$(".alert").fadeOut(2000);
$(".notice").fadeOut(2000);
$(".success").fadeOut(2000);
$(".info").fadeOut(2000);
});
कोई सफलता के साथ
.. मैं जावास्क्रिप्ट फ़ाइल
<%= javascript_include_tag 'jquery-1.3.2' %>
क्या त्रुटियां गतिशील रूप से लोड की गई हैं? – Eric
jQuery 1.6.2 है, लेकिन इससे कोई फर्क नहीं पड़ता, कंसोल खोलें, आपको देखना चाहिए कि क्या कोई त्रुटियां हैं, यह स्वयं ही काम करनी चाहिए। आपको HTML भी देखें (यदि इसमें सही वर्ग मान है)। –