All Projects → etienne-martin → jquery.dialog.js

etienne-martin / jquery.dialog.js

Licence: other
A lightweight replacement for the browser's default dialog boxes.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to jquery.dialog.js

react-st-modal
Simple and flexible modal dialog component for React JS
Stars: ✭ 41 (+141.18%)
Mutual labels:  alert, modal, dialog, prompt, confirm
Alertifyjs
A javascript framework for developing pretty browser dialogs and notifications.
Stars: ✭ 1,922 (+11205.88%)
Mutual labels:  alert, modal, dialog, prompt, confirm
Jbox
jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.
Stars: ✭ 1,251 (+7258.82%)
Mutual labels:  alert, modal, dialog, confirm
Ng Popups
🎉 Alert, confirm and prompt dialogs for Angular. Simple as that.
Stars: ✭ 80 (+370.59%)
Mutual labels:  alert, modal, dialog, prompt
Smalltalk
Promise-based Alert, Confirm and Prompt replacement
Stars: ✭ 76 (+347.06%)
Mutual labels:  alert, modal, prompt, confirm
mobile-message
基于移动端的弹窗组件,默认提供info、success、warning、error、alert、confirm、multiple、vertical、bottomSheet、prompt,可自定义弹窗。它可以包含任何Html内容可以自定义弹窗的样式,也可以加入自定以的弹窗动画。
Stars: ✭ 13 (-23.53%)
Mutual labels:  alert, dialog, prompt, confirm
Sweetalert2
A beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies.
Stars: ✭ 13,929 (+81835.29%)
Mutual labels:  alert, dialog, prompt, confirm
Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (+476.47%)
Mutual labels:  alert, dialog, prompt, confirm
Vuejs Dialog
A lightweight, promise based alert, prompt and confirm dialog
Stars: ✭ 327 (+1823.53%)
Mutual labels:  alert, dialog, prompt, confirm
React Native Alert Pro
The Pro Version of React Native Alert (Android & iOS)
Stars: ✭ 69 (+305.88%)
Mutual labels:  alert, modal, dialog, confirm
Wc Messagebox
基于 Vue 2.0 开发的 Alert, Toast, Confirm 插件, UI仿照 iOS 原生
Stars: ✭ 203 (+1094.12%)
Mutual labels:  alert, modal, dialog, confirm
svelte-accessible-dialog
An accessible dialog component for Svelte apps
Stars: ✭ 24 (+41.18%)
Mutual labels:  alert, modal, dialog
Alertjs
Dialog Builder allows you to create fully customisable dialogs and popups in Dynamics 365.
Stars: ✭ 80 (+370.59%)
Mutual labels:  alert, dialog, prompt
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (+488.24%)
Mutual labels:  alert, modal, dialog
Vue Simple Alert
Simple alert(), confirm(), prompt() for Vue.js
Stars: ✭ 93 (+447.06%)
Mutual labels:  alert, prompt, confirm
ax5ui-dialog
Javascript UI Component - Dialog - JavaScript Dialog / Bootstrap Dialog
Stars: ✭ 29 (+70.59%)
Mutual labels:  alert, prompt, confirm
eins-modal
Simple to use modal / alert / dialog / popup. Created with pure JS. No javascript knowledge required! Works on every browser and device! IE9
Stars: ✭ 30 (+76.47%)
Mutual labels:  alert, modal, dialog
Jquery Confirm
A multipurpose plugin for alert, confirm & dialog, with extended features.
Stars: ✭ 1,776 (+10347.06%)
Mutual labels:  alert, dialog, confirm
vue2-dialog
A mobile Vue plugin for VueDialog
Stars: ✭ 21 (+23.53%)
Mutual labels:  alert, dialog, confirm
Layer
丰富多样的 Web 弹出层组件,可轻松实现 Alert/Confirm/Prompt/ 普通提示/页面区块/iframe/tips等等几乎所有的弹出交互。目前已成为最多人使用的弹层解决方案
Stars: ✭ 8,202 (+48147.06%)
Mutual labels:  alert, dialog, confirm

jquery.dialog.js

A lightweight replacement for the browser's boring default dialog boxes.

Alert dialog Prompt dialog Confirm dialog

Getting Started

Embed jquery.dialog.css and jquery.dialog.js in your page.
Minified version: jquery.dialog.min.css, jquery.dialog.min.js

Requirements

This plugin has been tested with the following version of jQuery: 3.1.0.

Examples

Here's some basic examples on how to use the plugin:

Alert

Replaces the default alert() function.

dialog.alert({
	message: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
});

Prompt

Replaces the default prompt() function.

dialog.prompt({
	message: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
	callback: function(value){
		console.log(value);
	}
});

Confirm

Replaces the default confirm() function.

dialog.confirm({
	message: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
	callback: function(response){
		console.log(response);
	}
});

Try it yourself!

Download the project and open example.html in your favorite browser or check out the online demo on codepen.io.

Options

title

Type: String
Default: ""
Affects: alert, prompt & confirm

The title of the dialog.

dialog.alert({
	title: "This is a title",
	message: ...
});

message

Type: String
Default: ""
Affects: alert, prompt & confirm

The body of the dialog.

dialog.alert({
	message: "This is a message"
});

button

Type: String
Default: "Ok"
Affects: alert, prompt & confirm

The label of the confirmation button.

dialog.alert({
	message: ...,
	button: "This is a button"
});

cancel

Type: String
Default: "Cancel"
Affects: confirm

The label of the cancellation button.

dialog.confirm({
	message: ...,
	cancel: "This is a cancel button",
	callback: ...
});

required

Type: Boolean
Default: false
Affects: alert, prompt & confirm

Whether or not the user should interact with the dialog box.
Prevents the user from closing the dialog without entering any value.

dialog.confirm({
	message: ...,
	required: true,
	callback: ...
});

position

Type: String
Default: "fixed"
Affects: alert, prompt & confirm

Changes the css positioning of the dialog box. Can be either fixed or absolute.

dialog.alert({
	message: ...,
	position: "absolute"
});

animation

Type: String
Default: "scale"
Affects: alert, prompt & confirm

The animation used to animate the dialog box. Can be either scale, fade or slide.

dialog.alert({
	message: ...,
	animation: "slide"
});

input

Type: Object
Default: { type: "text" }
Affects: prompt

List of attributes to apply to the prompt input.

dialog.prompt({
	message: ...,
	input: {
		type: "password",
		placeholder: "This is a placeholder..."
	},
	callback: ...
});

validate

Type: Function
Default: function(value){}
Affects: prompt

Function used to validate the submitted value. The passed function should return true or false.
Prevents the dialog box from closing if the submitted value is invalid.

dialog.prompt({
	message: ...,
	validate: function(value){
		if( $.trim(value) === "" ){
			return false;
		}
	},
	callback: ...
});

callback

Type: Function
Default: function(value){}
Affects: alert, prompt & confirm

The function to be executed when the user closes/submits the dialog box.
The returned value is null if the user closes the dialog box.

dialog.prompt({
	message: ...,
	callback: function(value){
		console.log(value);
	}
});

Methods

close

Programmatically close the currently visible dialog box.

dialog.close();

Built With

  • Grunt - The JavaScript Task Runner
  • jQuery - A fast, small, and feature-rich JavaScript library
  • Sass - Syntactically Awesome Style Sheets

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Update the README.md with details of changes to the plugin.

Update example.html with examples demonstrating the changes to the plugin.

Build the project & test all the features before submitting your pull request.

Authors

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].