Skip to content

lencioni/jquery-popupwindow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

jQuery Popup Window Plugin

A super simple jQuery plugin for popup windows. Tested in IE7+, FF, Safari and Chrome.

Installation

Download the jquery.popupwindow.js file to your project, and add to your page after including jQuery:

<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.popupwindow.js" type="text/javascript"></script>

Checkout this example.

Basic Usage

To open a popup window:

$.popupWindow('http://google.com');

By default this will open a 500x500 pixel window which is auto-centered and has minimal chrome.

Options

Here's an example showing the full list of the options you can set:

$.popupWindow('http://google.com', {
    height: 300,
    width: 200,
    toolbar: false,
    scrollbars: false, // safari always adds scrollbars
    status: false,
    resizable: true,
    left: 100,
    top: 100,
    center: false, // auto-center
    createNew: true, // open a new window, or re-use existing popup
    name: null, // specify custom name for window (overrides createNew option)
    location: false,
    menubar: false,
    onUnload: function() { // callback when window closes
        alert('Window closed!');
    } 
});

About

Super simple jQuery popup window plugin

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%