views:

455

answers:

3

I'd like to make a very simple jquery box come up saying "Sorry, that blog post could not be found."

I don't want anything very advanced... How should I go about this?

+3  A: 

You can check out these nice custom alert and confirmation boxes. You can customize them.

Ólafur Waage
Thank you, this is wonderful!
Justin White
+2  A: 

Like the jQuery UI Dialog? Here's a Working Demo

$('div.no-post').dialog({        
    buttons: { 
        "Ok": function() { 
            $(this).dialog("close"); 
        } 
    },
    title: "Post Not Found",
    modal: true,
    draggable: false,
    resizable: false
});

<div class="no-post">
    Sorry, that blog post could not be found.
</div>

or I've always liked the BlockUI plugin

Russ Cam
It should be noted that if you decided to go this route in addition to vanilla jquery, you'll also need to include the jquery-ui.js and jquery-ui.css file in order for this to work. On the plus side you can use the jquery theme roller to make it look exactly like you want.
T. Stone
@T.Stone- Good point. If you're looking to use a number of UI components in your site then using the UI plugin is probably a good choice. You can specify which plugins to include in the jquery-ui.js, so you don't need to include ones that you're not going to use. Themeroller does make it easy to style the UI plugins too :)
Russ Cam
+2  A: 

The jQuery plug-in Impromptu is a good simple choice for a pop-up that looks a lot nicer than a standard JS alert

http://trentrichardson.com/Impromptu/index.php

There are instructions on the site that will help you in your implementation.

Chris Ballance