December 7th 2008

Modal Delete Confirmation V3 Using SimpleModal jQuery Plugin Demo

Since my posts about using the jQuery SimpleModal plugin as a confirmation dialog have been some of my most popular, I thought I would go ahead and update things now that Eric Martin has released version 1.2.1 of the plugin.

As I wrote about on Friday, the biggest changes to the plugin seem to be the automatic centering of the dialog, ability to always use an iframe if desired and the default names were changed from modalxxx to simplemodal-xxx. For a full list of changes, please see Eric’s change log section. With this version of my demo, I wanted to make the download pure html (not tied to ASP.NET) so that it might benefit more people. I also built upon Friday’s demo of a SimpleModal popup containing the NicEdit WYSIWYG editor.

Live Demo | Download (HTML, CSS, JavaScript)

Screenshot of End Product:

Confirm Dialog Image

I’m not really going to go into any code this time around as it really hasn’t changed much from V2 of my demo. If your interested please see it there or in the download.

One thing that I did want to point out that I haven’t talked about in the past is the ability to override the height and width of the confirmation dialog that is set by the base CSS. The SimpleModal plugin provides the containerCSS option which can be used to set the styling for the container div.

containerCss: ({ width: "600px", height: "140px" })
          

Be sure to checkout the demo and let me know in the comments what could be improved.