Bootstrap Component
  • Home
  • Darklight
  • Datepicker
  • Dialog
  • Dropdown
  • Fileuploader
  • Floater
  • Slider
  • Switch
  • Notify
  • Others

Dialog

An simple dialog which is made by Modal, working as js Alert.

  • Example
  • Usage
  • - Options
  • - Events

Dialog bootstrap-dialog.js

Examples

Dialog is an simple component enhanced by modal.

Usage

Enable dialog via JavaScript:

$.dialog(options, callback);

Options

Options should be passed via JavaScript.

Name type default description
title string Set the title of dialog window.
content string Set the content of dialog window. You can also set content as dom element.
close boolean true Display the close button.
confirm boolean false Set dialog mode as confirm. You can get the resault by callback function.
And other options is same in Modal Component.

Events

Event Description
callback It will trigger event when user close this dialog. Parameter return true if click confirm button in confirm dialog, else return false. You can return false to avoid dialog close.
$.dialog({
	title: "Comfirm",
	content: "Do You want to confirm?",
	confirm: true,
}, function(ret){
	// ret is true if user click 'confirm' button.
});

Build By zombieJ.