0.1.1 • Published 10 years ago
simple-popup v0.1.1
simple-popup
A jQuery(optional) plugin to show a popup.
DEMO: http://Alex1990.github.io/simple-popup
Usage
As a jQuery plugin:
var popup = $('#popup').popup();
// Open all popups.
popup.open();
// Close all popups.
popup.close();
// Pass a configurable object.
$('#popup').popup({
width: 400,
height: 300
});As a native plugin:
var popup = new Popup(document.getElementById('popup'), { width: 400, height: 300 });
// Open this popup.
popup.open();
// Close this popup.
popup.close();Also, this plugin supports as an AMD/CommonJS module.
Packages
You can use npm to install it.
NPM:
npm install simple-popupOptions
width
Type:
NumberDefault:500The popup width.
height
Type:
NumberDefault:400The popup height.
offsetX
Type:
NumberDefault:0The horizontal offset of the popup element.
offsetY
Type:
NumberDefault:0The vertical offset of the popup element.
zIndex
Type:
NumberDefault:999The popup element
z-indexvalue.closeBtnClass
Type:
StringDefault:'.popup-close'The close button's
className.
Issues
If you came across a bug or usage problem, welcome to submit an issue: https://github.com/Alex1990/simple-popup/issues.
License
Under the MIT license.