Press "Enter" to skip to content

A jQuery Plugin To Create A Timed Modal Dialog

The jQuery Timed Dialog plugin helps developers create modal/alert/customizable info dialogs to replace the original popups.

Handy Info/Confirm Modal Dialog Plugin, jQuery Timed Dialog Github, jquery confirm dialog, jquery delete confirmation dialog example

Key Features:

  • Easy to design with your own CSS.
  • Auto reject after a timeout, with or without a countdown timer
  • Supports any HTML content included in the dialog.
  • It allows you to append the dialog to any container element, not just the entire body.

How to make use of it:

1. Import the jQuery Timed Dialog plugin’s information into the HTML file.

<link href="/path/to/css/timed-dialog.css" rel="stylesheet" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/dist/timed-dialog.min.js"></script>

2. Create a primary ‘Info’ dialog and override the default dialog title & body.

$().timedDialog({
  body: '<b>HTML Content</b> is supported as well.',
  title: 'Dialog Title'
});

3. Create an affirmation dialog and execute a function when the user clicks the ‘Confirm’ button.

$().timedDialog({
  type: 'confirmation',
  body: 'Are You Sure?',
  title: 'Confirm Your Action',
  btnConfirm: {
    text: 'Confirm',
    action: () => {
    alert('done')
  }}
});

4. Customize the width/height of the dialog.

$().timedDialog({
  width: 400,
  height: 300
});

5. Determine whether or not to auto-close the dialog after a timeout, with an animated countdown timer on the ‘Dismiss’ button.

$().timedDialog({
  closeOnTimer: true,
  timeout: 20,
  timeout: true
});

6. All default configuration choices.

$().timedDialog({
  type: 'info',
  title: 'Info',
  body: 'This is the default body text. You might replace this with your own.',
  width: 320,
  height: 240,
  appendTo: 'body',
  closeOnEscape: true,
  closeOnTimer: false,
  timeout: 10, //ten seconds default timeout
  timeoutAnimation: true,
  isModal: true,
  btnDismiss: {
    text: "Dismiss",
    class: '',
  },
  btnConfirm: {
    text: "Confirm",
    action: () => {
        return
    },
    class: '',
  }
});

bootstrap confirm dialog jquery, jquery confirm close, bootstrap modal, material dialog, jquery confirm ajax, material design dialog


See Demo And Download

Official Website(armino-dev): Click Here

This superior jQuery/javascript plugin is developed by armino-dev. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *