Easy-to-use pop up window widget.
Supports dragging, closing, resizing, CSS styling, and loading content from AJAX.
PopUpWindow at its heart requires only a title and a content for the body to use. The content can be supplied as a string of HTML, a DOM element, or the response from an AJAX call. The simplest example is to pull the content as a DOM element (presumably on domready, so that it doesn't show in the normal page flow):
<div id="popUpContent"> <p>This is simple, static content for my pop up window.</p> </div>
Our JavaScript to create a pop up window is this:
var myPopUp = new PopUpWindow('My PopUp Window', { contentDiv: 'popUpContent' });
To open it:
myPopUp.open();
PopUpWindow offers a few convenience methods for positioning the window:
There are a few options of PopUpWindow to customize its behavior:
core:1.4.2/Events core:1.4.2/Options core:1.4.2/Element.Event core:1.4.2/Element.Style core:1.4.2/Element.Dimensions more:1.4.0.1/Drag.Move more:1.4.0.1/Element.Position
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus