jQuery pop up message box sliding from left to right and positioning horizontally at the center

Just wrote a simple sliding box script to make a message box appear sliding from left to the middle of web page. The box appears once a day. The first appearance is logged into a browser cookie, so if user opens the same website and if cookie was expired it appears again.

Note- In addition to jQuery library you need jquery.cookie plugin. The plugin could be downloaded from here:
http://plugins.jquery.com/project/Cookie

Following the javascript code. I placed this javascript code in <head></head> section of my web page after making calls to javascript files.

Although the code is quite self-explanatory i have placed comments next to each line of javascript which needed some explanation.

[=**=] – This is the javascript code block which is supposed to be wrapped in <script..></script> tags and placed between the <head></head> section:

To view it in action you may want to check this link.

4 thoughts on “jQuery pop up message box sliding from left to right and positioning horizontally at the center

  1. @Ezal – this script is supposed to load the pop up when page has finished loading. Refer to:

    jQuery(document).ready(function() { //js code to be executed on page load completed.

  2. Hi,

    Your script is very usefull, thanks for sharing it. However, is there anyway, we can make the pop up appear after the page completely finish loaded?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *