I have javascript function that show alert message and after 2 sec hide it. here is full function above
function hideNotifyReport(noanimation)
{
var el = jQuery('#report-notify');
var interval = 2; // sec
if (noanimation)
{
el.hide();
sizeNotifyReport();
}
else
{
el.css('opacity', 1).animate({ opacity: 0 }, interval*2000, function()
{
hideNotifyReport(true);
});
}
}
my problem is with this line :
el.css('opacity', 1).animate({ opacity: 0 }, interval*2000, function()
I want to add interval to opacity 1 to that message will be shown by “n” time and after hide. Problem is that now it shows and too fast hide
I think this is what you want: