In this tutorial, I’m going to share how to create a simple modal window with jQuery. It selects all the anchor tags with name attribute set to “modal” and grab the DIV #id defined in the href and displays it as a modal window. jQuery has made everything so simple, be sure to check out the demonstrations, examples I made.
Simple Modal Window
In this tutorial, I’m going to share how to create a simple modal window with jQuery. I like jQuery, it makes everything so simple and so easy. In case you don’t know what’s modal window. You can click here. That’s an example of a modal window.
In this website, I’m using facebox (inspiration from facebook). Others, such as lightbox, thickbox, multibox, litebox…… it’s too many of them and they all are having different features.
Right, let’s start, this example will show you how to create a modal window that will display the content of a DIV #ID.
My objectives are:
* Able to search the whole html document for A tag NAME=”modal” attribute, so when users click on it, it will display the content of DIV #ID in the HREF attribute in Modal Window.
* A mask that will fill the whole screen.
* Modal windows that is simple and easy to modify.
The finished product
Yes, that’s all you need to make a simple jquery modal window. In this tutorial, it shown you the concept of how to display DIV content inside a …