Collaborate without boundaries

Jquery tips – Tip 1 – How to display nice popup information messages

Development Romance

WPF, C# and Silverlight

Jquery tips – Tip 1 – How to display nice popup information messages

Rate This
  • Comments 4

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

image

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:

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

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:

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

and the following script in the head section:

   1: <script type="text/javascript">
   1:  
   2:             $(document).ready(function() {
   3:                 $('#press').click(function() {
   4:                     $.growlUI(null, 'Sample message');
   5:                 });
   6:             });
   7:         
</script>

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Post
Page 1 of 1 (4 items)
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Post