Ask questions and get good answers on jQuery

Hello,

I'm using jQuery BlockUI plugin, and i have been able to sucessfully show a single message in the page, however... let's say that I want to show 3 messages , one after another.

Something like:

  1. message: 'hello world!'
  2. message: 'hello galaxy!'
  3. message: 'hello universe!'

how do I do this with jQuery BlockUI?

asked Jan 08 '10 at 13:31

Marco's gravatar image

Marco
134

edited Jan 08 '10 at 16:53

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129


You don't say what should trigger the messages to appear, so I'll assume each will display for 2 seconds. Basically you want to invoke blockUI again onUnblock of the previous message.

$.blockUI({
    message: '<h1>hello world!</h1>',
    timeout: 2000,
    onUnblock: function () {
        $.blockUI({
            message: '<h1>hello galaxy!</h1>',
            timeout: 2000,
            onUnblock: function () {
                $.blockUI({
                    message: '<h1>hello universe!</h1>',
                    timeout: 2000
                });
            }
        });
    }
});

answered Jan 26 '10 at 21:22

Bernhard%20Hofmann's gravatar image

Bernhard Hofmann
926

Your answer
toggle preview

jQuery main site - Matteo Bicocchi