0.0.9 • Published 10 years ago

missile-box v0.0.9

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

missile-box

Flat, responsive, lightweight, fast, easy customizable modal window plugin.

Install

npm install missile-box

Usage

var Box = require('missile-box');

// Dialog
var box = new Box({
	title: 'Dialog Title',
	animate: 'fadeIn',
	before: function() {
		console.log('before', this);
	},
	done: function () {
		console.log('done', this);
	},
	ok: function (e) {
		alert('clicked ok button');
		console.log(this, e.currentTarget);
	},
	cancel: function (e) {
		alert('clicked cancel button');
		console.log(this, e.currentTarget);
	}
});

// Confirm
var box = new Box({
	title: 'Confirm Tips',
	subTitle: 'Are you sure you want to do this?',
	type: 'confirm',
	animate: 'fadeIn',
	done: function () {
		console.log('done', this);
	},
	ok: function (e) {
		alert('clicked ok button');
		console.log(this, e.currentTarget);
	},
	cancel: function (e) {
		alert('clicked cancel button');
		console.log(this, e.currentTarget);
	}
});

// Alert
var box = new Box({
	title: 'Alert Tips',
	subTitle: 'Missile Fired!',
	type: 'alert',
	animate: 'fadeIn',
	done: function () {
		console.log('done', this);
	},
	ok: function (e) {
		alert('clicked ok button');
		console.log(this, e.currentTarget);
	}
});
0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago