mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 03:57:08 -04:00
18 lines
403 B
JavaScript
18 lines
403 B
JavaScript
modulejs.define('view/notification', ['$', 'view/root'], function ($, root) {
|
|
|
|
var $el = $('<div id="notification"/>').hide().appendTo(root.$el);
|
|
|
|
function set(content) {
|
|
|
|
if (content) {
|
|
$el.stop(true, true).html(content).fadeIn(400);
|
|
} else {
|
|
$el.stop(true, true).fadeOut(400);
|
|
}
|
|
}
|
|
|
|
return {
|
|
$el: $el,
|
|
set: set
|
|
};
|
|
});
|