The error i want to show
flash[:error] = "Invalid username/password combination."
I've tried
$(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);
});
with no success.. I have included the javascript file
<%= javascript_include_tag 'jquery-1.3.2' %>
You don't have a way to get the error message.
flash[:error] = "Invalid username/password combination."
just outputs raw text.
flash[:error] = "<div class='error'>Invalid username/password
combination.</div>"
wraps it in a container.
then you can just use jQuery to fade the container out.
$(".error").fadeOut(2000);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With