Confirm Boxes Tutorial : Introduction

Chapter 1. Introduction

When we develop a web application, we have to take into account that the user can make some mistakes. This is especially important if this user has some privileges.

In this case, we must ask for confirmation when someone tries to do something risky, like this:

confirm('Do you really want to delete this file?');

Try it!

As you can see, confirm boxes are not really beautiful… In our great web application, it’s not good at all!

I propose you a way to customize these ugly boxes thanks to jQuery: we’ll develop together a small plugin from start to end.

[Note]Note

If you don’t know how to create a jQuery plugin, you should read this tutorial before continuing this one.