This is jQuery Super Lightweight, Super Simple (Modal) Popup Dialog Box – 1.5KB. No Fuss.
It supports fading background and rounded corners, very simple to setup and use, no complex features just a quick and simple but effective dialog box.
A simple demo with minimum code can be found here: http://www.mywebdeveloperblog.com/projects/modalpoplite/demo/
Or fork me on https://github.com/shibbard/jQuery-modalPopLite
Step 1: Include files.
Step 2: Attach the popup to a container on the page providing reference to open button(s) and close button.
Step 3: Create the page with an element to click and open the popup and a close button.
- openButton – target element to open the popup (eg ‘#clicker’ or a class ‘.clicker’)
- closeButton – target element to close the popup
- isModal – true or false. If true the popup is modal and clicking the background will not close the popup. Only the ‘closeButton’ target will.
- callBack – Name of function to call when the popup is closed