我正在尝试使用jQuery Pines Notify 1.2。
1)通知弹窗中有一个关闭按钮,我们可以用它来关闭通知。或者当计时器达到延迟值时,它会自动关闭。但是是否可以通过单击通知中的任何点来关闭通知?
2)我尝试并成功运行了基本的。但我尝试了演示页面的“自定义堆栈示例”部分。但他们没有工作。例如这个:
show_stack_topleft('notice');
function show_stack_topleft(type) {
var opts = {
title: "Over Here",
text: "Check me out. I'm in a different stack.",
addclass: "stack-topleft",
stack: stack_topleft
};
switch (type) {
case 'error':
opts.title = "Oh No";
opts.text = "Watch out for that water tower!";
opts.type = "error";
break;
case 'info':
opts.title = "Breaking News";
opts.text = "Have you met Ted?";
opts.type = "info";
break;
case 'success':
opts.title = "Good News Everyone";
opts.text = "I've invented a device that bites shiny metal asses.";
opts.type = "success";
break;
}
$.pnotify(opts);
}
当我运行这段代码时,我明白了stack_topleft is undefined
。
但是,如果我删除stack: stack_topleft
线,我仍然看不到左上角的通知。