1234567891011121314151617 |
- function popup(kind, body) {
- var html = '';
- html += '<div id="notification_' + String(window.notification_id) + '" class="notification is-' + kind + '">';
- html += '<button class="delete" onclick="$(\'#notification_' + String(window.notification_id) + '\').remove();"></button>';
- html += body;
- html += '<script>setTimeout(function() {$(\'#notification_' + String(window.notification_id) + '\').fadeOut(500);}, 2500);</script>';
- html += '</div>';
- $('#notifications').append(html);
- window.notification_id++;
- }
- $(function() {
- window.notification_id = 0;
- });
|