views:

286

answers:

1

I have a simple app that executes $.jGrowl("loading");. Then the data is displayed $.jGrowl("blah blah blah data goes here"); after crunching data which can take 1 -5 seconds.

I've seen a post that mentions using the default.pool to only display one message at a time. The format I want is:

  • Show box 1
  • crunch data
  • close box 1
  • show box 2

Is there a jGrowl function that can be initiated to close all notifications?

UPDATE
according to the source example you can do the folowing
$('#loading').jGrowl('<img src="images/loading.gif" alt="Loading..." />');
then call to close it
$('#loading').jGrowl('shutdown');
<div id="loading" class="top-right"></div> that does hide the loading growl, however it also hide subsequent notifications in that region.

A: 
$('#loadinggrowl').jGrowl('<img src="images/loading.gif" alt="Loading..." />');
$.jGrowl('content here');
document.getElementById('loadinggrowl').style.display = "none";

<body><div id="loading" class="top-right"></div></body>

Line 3 above hides the loadinggrowl div after loading the content.

this may not be the best way, but it works.

shaiss