DZone
Web Dev Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > Jquery tips – Tip 1 – How to display nice popup information messages

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

Nikos Printezis user avatar by
Nikos Printezis
·
May. 31, 11 · Web Dev Zone · Interview
Like (0)
Save
Tweet
4.14K Views

Join the DZone community and get the full member experience.

Join For Free

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:

<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"></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:

<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');

});
});

</script>

 

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

From http://www.studentguru.gr/blogs/solidus/archive/2011/05/30/jquery-tips-tip-1-how-to-display-nice-popup-information-messages.aspx

JQuery

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Instancio: Random Test Data Generator for Java (Part 1)
  • Toying With Kotlin’s Context Receivers
  • Troubleshooting Memory Leaks With Heap Profilers
  • How To Use Cluster Mesh for Multi-Region Kubernetes Pod Communication

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo