Jump to content

Recommended Posts

I'd like to display a message box that fades in, remains for a few seconds, and then fades out. Additionally, I'd like the box to have only a message/image, no prompts, i.e. ok, cancel, etc.

 

Does anyone have any examples for or tutorials of what I've described using jQuery?

Link to comment
https://forums.phpfreaks.com/topic/133559-how-to-create-jquery-infopop-up-boxes/
Share on other sites

I'd like to display a message box that fades in, remains for a few seconds, and then fades out. Additionally, I'd like the box to have only a message/image, no prompts, i.e. ok, cancel, etc.

 

Does anyone have any examples for or tutorials of what I've described using jQuery?

 

I don't know of any tutorials that combine all of the behaviors you want, but I'm pretty sure it's possible.  Your best bet may be to combine jQuery's effects (easiest are show and hide: http://docs.jquery.com/Effects) with JavaScript's own setTimeout function.  Something like (this is pseudo-code):

 

On page load, show the box:

$(document).ready(function()
{
   $("#myBoxId").show();

 

Set the time out:

   var timeoutHandle = setTimeout("$('#myBoxId').hide()", 5000); //hide after 5 seconds
});

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.