如何显示 jgrowl 通知的数量?
我正在使用 5 个 jquery 池。因此只应显示 5 条通知。我认为最好在“关闭全部”按钮下显示如图所示的 20 条通知中的 5 条的计数。
对我来说,如果我不断关闭通知而新通知不断弹出,可能会让人感到困惑。我可能认为该网站存在某种问题。
有人知道该怎么做吗?
I am using a pool of 5 with jquery. So only 5 notifications should be shown. I think it would be nice to have maybe under the "close all" button to have a count like shown 5 of 20 notifications.
To me it could get confusing if I keep closing notifications and new ones keep poping up. I might think there is some sort of problem with the site.
Anyone know how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在全局变量中存储打开通知的数量,并通过 jgrowl 事件中调用的自定义函数来增加/减少/显示它:
beforeOpen
/open
和beforeClose
/关闭
即:You can store number of open notifications in global variable and increase/decrease/display it by custom function called in jgrowl events:
beforeOpen
/open
andbeforeClose
/close
ie: