Over a million developers have joined DZone.

jQuery Tips – How to Display Popup Information Messages

· Java Zone

Easily build powerful user management, authentication, and authorization into your web and mobile applications. Download this Forrester report on the new landscape of Customer Identity and Access Management, brought to you in partnership with Stormpath.

Would you like to display beautiful popup messages like this one ?


Now, it’s easier than ever. Just use jquery and the jquery.blockUI.js plugin. You may download the jquery.blockUI.js plugin here. Now, in a we page, add the following scripts in the head section:

   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>

   <script type="text/javascript" src="jquery.blockUI.js">


You have now added the jquery library and the jquery.blockUI.js plugin in your web page. Lets create a button that when is pressed, a popup message is diplayed. Add the following input button in the body section:

<input type="button" value="press" id="press" />

and the following script in the head section:

<script type="text/javascript">
                $(document).ready(function() {
                    $('#press').click(function() {
                        $.growlUI(null, 'Sample message');

The $.growlUI is the function need for diplaying the popup message. Now, open your web page, press the button and enjoy the result.

Building Identity Management, including authentication and authorization? Try Stormpath! Our REST API and robust Java SDK support can eliminate your security risk and can be implemented in minutes. Sign up, and never build auth again!


Published at DZone with permission of Nikos Printezis, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}