JGrowl: How can I limit my interface to one message at a time?

Provided: I load the message queue when the page loads.

Using jGrowl, how can I display each message, one message at a time, drip?

+3
source share
3 answers

I needed to do this for a project a few months ago. If you use the union function available in the latest version of jGrowl (1.2.0 at the time of this writing), you can simply write:

$.jGrowl.defaults.pool = 1;

, , jGrowl , . , jGrowl .

, , .

+8

$. jGrowl.defaults.pool == 0;

if ($ (this.element).find('div.jGrowl-notification: parent'). size() < 0) {

, , . , ! .:)

+2

, (), JS setTimeout , .

Alternatively, jGrowl can use the function (e, m, o) as its close parameter and use it as a callback whenever the message closes. In this function, create a new message from your queue and you should be installed. See the documentation here .

+1
source

Source: https://habr.com/ru/post/1715981/


All Articles