Auto-close alert from Bootstrap 3?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
37 views
Hi!
There is a feedback form with two alert about successful sending or error.
How to make this alert auto-close after a certain time?

The difficulty is that they form in php sending emails.
Is it possible to prescribe the solution in the php file or is there a js script to AutoClose alert if they appear on the page?
Here is the code:
$result = "; if (mail ($to, $subject, $body, $headers)) { $result .= ''; $result .= ''; $result .= 'SENT SUCCESSFULLY!'; $result .= ''; echo $result; die(); } $result = "; $result .= ''; $result .= ''; $result .= 'ERROR SENDING'; $result .= ''; echo $result;


Found one example AutoClose, but I can't adapt to your code.
https://codepen.io/CSWApps/pen/XJoLmN
by | 37 views

2 Answers

0 like 0 dislike
but why write a Bicycle?
\ralertifyjs.com/notifier.html
by
0 like 0 dislike
Use https://ned.im/noty/#/
Customize as you want. The result will be what you need.

Either put in a timeout and call a code.
$(".alert").alert("close")
$(".alert").fadeOut(); $(".alert").slideUp(); $(".alert").hide();
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
5 answers
0 like 0 dislike
3 answers
110,608 questions
257,187 answers
0 comments
40,796 users